/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: EdT 10 years ago
Red Belt
-1
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
 
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