Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

Script to clean up the home drive folder

$
0
0

Hi All, 

I pretty much have no experience with powershell, but think it is going to be my easiest option to acheive the following. I have a CSV containing folder names (that correlate to AD login names) and this is an outline of what I need to do - 

Need to verify that names in the CSV exist within AD

If user doesn't exist, then need to move folder from \\server\home$\ to a staging folder

Output results to CSV

 

Basically, we have an account deletion script, but it only deletes the contents of the users home folder, instead of the the actual folder, so we now have alot of empty folders :(

 

Is anyone able to assist me with this? Or already have something like this in existence that they wouldn't mind sharing?

 

Thanks

 


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images