/build/static/layout/Breadcrumb_cap_w.png

script to delete user profile and shared drive folder

does anyone know a powerscript or vbscript that will delete folders for specific userids instead of doing it manually one at a time


1 Comment   [ + ] Show comment
  • There is a very nice program for this task called delprof2
    http://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool - flip1001 10 years ago

Answers (2)

Posted by: anonymous_9363 10 years ago
Red Belt
0

There are at least...ooooh, I don't know...a quadzillion scripts around which will search a folder and its sub-folders for a specific file and/or folder. The fact that the folder is named as a user ID is pretty much irrelevant - it's still just a folder.

Posted by: rvprasad 10 years ago
Brown Belt
0

VB script:

On error resume next

Set fso = createobject("scripting.filesystemobject")

Set wshell = wscript.createobject("wscript.shell")

Set SysDrv = wshell.ExpandEnvironmentStrings("%SystemDrive%")

 

Set Folder = fso.GetFolder(SysDrv & "\Users")

Set fc = folder.subfolders

For each userprof in fc

fso.deletefile usesrprof & "\<path of the file needs to deleted>"

Next

 

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ