Hello
Yes, you can achieve this by updating the MDT AutoLogin registry settings after renaming the local admin account. Here is a script that does exactly that:
'//—————————————————————————-
'// Global constant and variable declarations
'//—————————————————————————-
Option Explicit
Dim iRetVal
'//—————————————————————————-
'// Main routine
'//—————————————————————————-
'On Error Resume Next
iRetVal = ZTIProcess
ProcessResults iRetVal
'On Error Goto 0
'//—————————————————————————
'// Function: ZTIProcess ()
'//—————————————————————————-
Function ZTIProcess ()
Dim colUserAccounts
Dim objUser
Dim oAccount
Dim AdminAccount
Dim strComputer
Dim objNet
Set objNet = Createobject ("WScript.Network")
strComputer = UCASE (objNet.ComputerName)
'Determine Local Administrator Account
Set colUserAccounts = objWMI.ExecQuery ("Select * From Win32_UserAccount where LocalAccount = TRUE")
For each oAccount in colUserAccounts
If Left (oAccount.SID, 6) = "S-1-5-" and Right (oAccount.SID, 4) = "-500" Then
oLogging.CreateEntry "Renaming regional Administrator account to Admin" , LogTypeInfo
AdminAccount=oAccount.Name
oAccount.Rename "Admin"
oLogging.CreateEntry "Updating MDT autoLogon key with renamed Administrator info (Admin)" , LogTypeInfo
oShell.RegWrite "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\DefaultUserName" , "Admin" , "REG_SZ"
End If
Next
iRetVal = Success
ZTIProcess = iRetval
End Function
This script renames the local admin account (in any language) and updates the MDT AutoLogin registry settings. You need to replace "Admin" with your desired username on the two lines shown below:
oAccount.Rename "Admin"
oShell.RegWrite "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\DefaultUserName" , "Admin" , "REG_SZ"
After running this script, the system should display your renamed account in the username textbox after reboot.