Delete a User Profile
Is there a script or method to delete a local profile at the end of imaging a process, I am imaging machines with a service account so the local admin on the machine can have pw resets from AD. I want to delete the service account from the machine when the process is completed. Any one have a K2 script for this?
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
EdT
10 years ago
You obviously can't be logged in as the service account when you come to delete it. Consequently you would need to login as the local admin and then run a script to delete the c:\users\serviceuser directory tree. There are plenty of vbscripts you can get via google to delete a directory tree, and to complete the process, you can run the command utility: net user <username> /delete