I'm trying to create (if one doesn't already exist) a couple of PS scripts.
1.) Recurse the home directory folders on the server (i.e., \\server_name\share\jsmith , \\server_name\share\tjones etc.) and look for that account in AD. If there's no account in AD, delete the home folder
2.) Script to take input for the AD account to delete and then follow up by deleting the home folder.
Any suggestions on how to start and/or has anyone seen any scripts like this?
Thank you,
Ed