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

Changing folder owner adds full control to that user when scripted but not though the gui

$
0
0

i have a script that basically changes the owner of everyone homepath and sets them as the owner

i dont want the user to have full control of any folder just the modified permission 

which i use the windows gui on the folder and change the owner none of the permission change

when i use the 


$ownerref=Get-Acl $folder.FullName

$ownerref.SetOwner([System.Security.Principal.NTAccount] “domain\$user“

the user gets a special permission just on the folder for full control how do i stop this from happening


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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