Hi I believe what I am attempting to do is very easy but for some reason it's not working. I am assisting in a task to add a new group as our file sharing group to our file shares.
I have been able to add permissions to each folder underneath a hidden share with a command like the following.
add-ntfsaccess -path "\\server\sharename$\foldername\" , "\\server\sharename$\foldername\" , "\\server\sharename$\foldername\" , -account domain\account -accessrights fullcontrol -appliesto thisfoldersubfoldersandfiles
This appears to work fine however I only use this because when I attempt to apply to the hidden share directly with a command such as
add-ntfsaccess -path "\\server\sharename$\" -account domain\account -accessrights read -appliesto thisfolderonly
Powershell simply hangs and has to be closed (as you can see this is trying to target only...