Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell hang when attempting to add permissions to hidden share

$
0
0

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...


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>