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. EditLets 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.
精彩评论