I am wanting a script, preferably a batch script but maybe vbscript for an AD user folder cleanup. I am barely learning powershell so I am still gun shy about it. What I am wanting to do is have a script that will generate a list of all users in an OU plus all sub OUs and then parse a list of folders in a folder share, skipping one folder in that share, and if there is a folder for a user that is no longer in AD move that folder and all of its contents to the folder that was skipped in the reading. Also, if there is a user in AD that does not have a folder, create it and give it permission.
AD users Shared folders
I would like for the script to move the Henry folder and create the George folder and give user full rights to folder.
I have had a script that should have done that before, but if anything was out of order, then every folder after that would have been moved so I scrapped it. I did a dsquery user to a txt file and then listed all directories in the folder and did a direct comparison.