Change Local adminstrator name and password during MDT deployment
-
Wednesday, November 28, 2012 7:33 AM
I have a Windows 7 image from global and would like to change local administrator name and password during deployment.
But I do not want to add/change any setting on the global image as like SETUPCOMPLETE.CMD.
It is possible configure on the MDT unattend.xml? I do not want to touch the global image and get changes from MDT unattend.xml. Thank you
Regards,
Alan Lim
All Replies
-
Wednesday, November 28, 2012 8:41 AM
If remember correctly this was not supported since MDT heavily relies on the local administrator account to function.
It might be possible to do though but it's not recommended.
-
Wednesday, November 28, 2012 2:03 PM
Either set the details in unattend.xml or else you could just write a script to do it from within the OS that you run as a standard action. This will need t:
- Change the username
- Change the password
- Update the Winlogon details in the registry with the new username/password
For unattend,this may be useful. Use the SIM to change it though.
<AutoLogon> <Password> <Value>Mypass</Value> <PlainText>true</PlainText> </Password> <Enabled>true</Enabled> <LogonCount>999</LogonCount> <Username>Administrator</Username> </AutoLogon>
-
Wednesday, November 28, 2012 2:30 PM
As Andrew said, you could write a script to do it:
net user Administrator my$hinyP@ssword!
We use this method to change the password and to add special local support accounts to a machine. Using "wmi UserAccount ..." also works in a script or something via PowerShell.
If you are doing this during a capture of a base image, make sure you run the script after "Execute Sysprep", but before rebooting to WinPE and Creating the WIM.
- David
David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek
-
Wednesday, November 28, 2012 2:46 PM
To rename the account I would script it out. Since MDT relieis heavily on the administrator account I have this as the last task during my build sequence.
wmic UserAccount where Name="Administrator" call Rename Name="New_Admin_Account_Name"
-
Wednesday, November 28, 2012 3:21 PM
MDT doesnt rely heavily on the administrator account as such- MDT just needs to be able to log in as the administrator account. As long as you configure you build to log in with the new details then all is well with the world. This can be achieved in a number of ways.
Unattend is the easiest and won't involve scripting but multiple solutions are posted above.
-
Friday, February 15, 2013 1:18 PM
Hi Andrew
I have created an account called loan which is the Admin account what do i have to edit in the unattend file so the build will run (after the PE) part because it stops after the PE i take it bacause the unattend is trying to run the build in the wrong account.
Regards
Carl
- Edited by Carl Chalmers Friday, February 15, 2013 1:18 PM
-
Sunday, February 17, 2013 9:48 AM
I have a Windows 7 image from global and would like to change local administrator name and password during deployment.
But I do not want to add/change any setting on the global image as like SETUPCOMPLETE.CMD.
It is possible configure on the MDT unattend.xml? I do not want to touch the global image and get changes from MDT unattend.xml. Thank you
Regards,
Alan Lim
Why?
best regards
- Edited by Code 46 Sunday, February 17, 2013 9:48 AM

