I have the below script, it works fine, but how do I set it to keep security settings and add additional 'person' to the security group...
...and can cacls
change the 'owner' of the folder?
I tired /e
to edit instead of replace but it doesn't like it for some reason ?
Set WshShell = CreateObject("WScript.Shell")
strFolder = "D:\test"
setPerms = "%COMSPEC% /c echo Y| C:\windows\system32\cacls.exe """ & _
strFolder & """ /G mydomain\myusername:F & pause" 'added pause to see what the outcome is
WshShell.run setPerms