hi all,
i am a reader of the forum for some time now, but never had a question my self... now it's time :-)
upfront, i am not a programmer but i use PS often for simple tasks . specially when the normal windows shell is not enought - i am a system administrator.
i would like to write a small script that does a simpe task, but i simply don't get it working - maybe i am going the wrong direction or i am simply to stupid :-)
i have googled for hours but didn't find a tool for this job and all PS hints i found for "similar" issues didn't work out for me.
the problem i am facing:
we change AD domain (as we got bought by another company) and one of my fileservers has millions NTFS permissions set on files and folders.
what i would like to have (in english ;) ):
for each (folder, subfolder and file in $targetdir) do {
read all ntfs permissions + search for users with $startdomain + if not inherted create a similar ACL with 100% same permissions but replace $startdomain with $targetdomain
so the goal woud be, if domain1\userX has rw on the file then after the script the user domain1\userX and domain2\userX have rw on the file (it could be more then just 1 user that needs to get "copied" per file/dir)
thank you for any hints (i would also use a existing tool, but was not able to find on)
opa