DreCon Posted September 30, 2010 Posted September 30, 2010 Hi, I currently have a large number of users to be deleted, all with home folders on various servers. The issue is, when the ID's are deleted from AD, the home folders have to be unshared and removed manually. At the moment, the only solution is to do a dump of the home drive locations (using the Hyena application), connect to each server through "Computer Management", unshare the home drive, and manually delete the folder. Is there any tool that can do this, or any other way to automate this process? Cheers.
Azhibberd Posted October 4, 2010 Posted October 4, 2010 Well you can remove the share remotely using "net share sharename \\computername" so if you have a list of usernames to delete you could use excel with the command to unshare it and then delete it
7andY Posted October 5, 2010 Posted October 5, 2010 Nice little script... REM Script to de-share all sub-folders within a folder REM Use when deleting a student year group REM Set folder before use!! FOR /D %%I IN (F:\USERDATA\STUDATA\HDRIVES\2009\*) DO NET SHARE %%~nI$ /DELETE REM Follow up with RMDIR /S F:\USERDATA\STUDATA\HDRIVES\2009
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now