Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Problem with setting permissions using PowerShell.

$
0
0

I am trying to use the first script below to set perms on a folder structure for updating and then run the second script to reset the folder structure to be secured.  The problem I am having is when I run the script 3 folders are not being effected by the script.  In other words for all folders but 3 the permissions are changed.  But, for these 3 folders the permissions are not changed.  I have to go in and manually change the permissions.  I am not sure what the problem is.  It might have something to do with ownership but I am not sure.  Can someone shed some light on this for me?  thanks

$Acl = Get-Acl "C:\temp\folder-update"
Set-Acl "C:\Data\Web-sites\site1" $Acl

$Acl = Get-Acl "C:\temp\folder-locked"
Set-Acl "C:\Data\Web-sites\site1" $Acl


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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