Removing local Administrator Account after Imageinstallation
Hello ITNinja Community,
we are using the K2000 and a Scripted Installation to perform our windows imageinstallations. The Scripted Installation uses a local admin account which gets created during the image installation. We would like to remove this local account after the installation is finished. For that I created a Powershell script and a corresponding post installation task. The powershell script logs out all users and removes the administrator account. The problem is, that the scripted installation wont get finished after running the script. It seems like the local admin account is required in order to complete the installation. Is there any way to complete the installation upon removing the account?
Thanks in advance
The full cleanout is done by this account so it is not possible to remove it while the deployment.
Keep in mind, that all Post Install Tasks are running with the freshly installed OS, so do not do this in a Mid Level Task!
You can set as last task a task which copies a batch file which deletes the user and the user folder to the system and a task which sets HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce to run this file. Then it will run first time the system boots up after deoloyment and clean out.