开发者

Working with shared folders and printers in AD with PowerShell

Is there a way to manipulate permissions for using shared folders and/or printers for Active Directory Users and Groups using PowerShell ?

I've been reading about Get/Remove/Set-QADPermission but i can't seem to find an example for shared folders or printers.

Edit

Lets say I have a group witch has access to a couple of shared folders and printers. When i create another group, how can i get the access to the same folders/printers from the previous group?

Empo answered how to get access to folders (thanks again), can somebody please hel开发者_如何学Cp me with getting access to a shared printer as well?


You should work with the cmdlets Get-ACL and Set-ACL. The former returns the security descriptor of the selected provider in terms of System.Security.AccessControl. You can use the returned object to manipulate permissions and then reset the security descriptor back using the latter cmdlet.

For examples of using the cmdlet you can see:

get-help Get-ACL -examples

You might be interested also in reading this blog post.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜