Hi all.
Long time lurker and first time poster! There is some great stuff here and i'm hoping someone can help.
I have found heaps on creating new directories and setting permissions with powershell and CSV but I haven't found a script that can help me with pre-existing folders.
Scenario:
- We are moving from domain A to domain B due to company acquisition. There is no trust relationship.
- We have moved all shares across to the new file server on domain B. This includes approx 60 user home directories
- User accounts have been created on domain B but in a different format (Domain A: firstinitallastname, Domain B: lastnamefirstinitial(s))
- I have a CSV file with column A has home directory names (e.g. lpryor for me). Column B has their new usernames on domain B (e.g. pryorle). No column heading in CSV file. Just data.
- The folder is located at \\new_server\users\user_name (e.g. \\new_server\users\lpryor)
What I would like to do is to rename the individual users folders with their new usernames and set the permissions on these folders with user as the only allowed user and permission set to full control.
Does anyone have a script or know how to make one that would do it!
Thanks in advance!!
Lee