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
Answers (2)
Please log in to answer
Posted by:
anonymous_9363
11 years ago
Posted by:
rvprasad
11 years ago
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
http://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool - flip1001 11 years ago