Microsoft Virtualization Discussions

How to add the local controller "Power Users" group to every share on the same controller?

GeorgeZuggNC
2,801 Views

How do I go about using powershell to add the local controller "Power Users" group to every share on the same controller?  I can do a single share like this {Set-NaCifsShareAcl -Share sharename -User "Power Users" -AccessRights Read} but I want to touch every share on this single controller.

2 REPLIES 2

GeorgeZuggNC
2,801 Views

Is there a way to add the same user to every share on the same controller using powershell if I am the administrator or logged in as root?

markweber
2,753 Views

get-nacifsshare | %{Set-NaCifsShareAcl -Share $_.sharename -User "Power Users" -AccessRights Read}

 

i don't have any 7-mode left to test that on, so ymmv

Public