MDT 2010: Make the local admin password optional.

If you want to be able to set the local admin password but also leave the possibility to make it blank, edit the following file \scripts\DeployWiz_Validation.vbs:

' Validate Password'
Function ValidatePassword
ValidatePassword = TRUE
NonMatchPassword.style.display = "none"
If Password1.Value <> "" then
If Password1.Value <> Password2.Value then
ValidatePassword = FALSE
NonMatchPassword.style.display = "inline"
End if
End if
ButtonNext.Disabled = not ValidatePassword
End Function

Namaste.

Add a domain user as the local admin with a script.

If you need to automate the attribution of local admin rights, use the following script, that will save you quite a few clicks:

Dim DomainName
Dim UserAccount
Set net = WScript.CreateObject("WScript.Network")
local = net.ComputerName
DomainName = "CONTOSO"

set group = GetObject("WinNT://"& local &"/Administrators")

UserAccount = InputBox( "Please enter the username (first.last) of the local admin or cancel (the user must exist in AD)" )

on error resume next
group.Add "WinNT://"& DomainName &"/"& UserAccount &""
CheckError

sub CheckError
if not err.number=0 then
set ole = CreateObject("ole.err")
MsgBox ole.oleError(err.Number), vbCritical
err.clear
else
MsgBox "User added to the local Admin Group"
end if
end sub

Namaste.

Twitter Delicious Facebook Digg Stumbleupon Favorites More