Cant get 2013 data base AdminPassword= to work in OSD task sequence RRS feed

  • Question

  • I'm using the MDT database to consolidate five windows 7 task sequences on five SCCM2007 site servers to one task sequence on one 2012 R2 site server. I got my locations by ip subnet working and most of the settings applied successfully, Join Domain, add  a group to the local  admin group, but I can't seem to get the AdminPassword=MyPassword to work.

    I've got an "apply windows settings" step in my task sequence. But the machine keeps getting what ever its password is set to.

    If I leave it bland then I get a blank password etc.. If I run without the "apply windows settings" step then then the task sequence fails and finishes with a mini setup prompting for a computer name. I can see the other values that are collected in the Bdd.log:

    Remapping variables.

    Property OSDDomainName is now = My.Domain

    <Message containing password has been suppressed>

    I even tried adding the default setting directly to the customsettings.ini file: AdminPassword=MyPassword. But the workstation still takes its password from the "apply windows step". I'm going to try and enable debug logging and see if the log has anything about the local admin password. Anyone have any ideas? What am I doing wrong here?

    Priority=LSettings, LAdmins,


    Friday, January 30, 2015 11:49 AM


All replies

  • Making some progress I put in a little vbs script, (package), command line step, just after the gather step, in my OSD task sequence:

    set env = CreateObject("Microsoft.SMS.TSEnvironment")

    Name = inputbox("Enter the new local admin password" ,"Prompt for Local Admin Password:",env("OSDLocalAdminPassword"),6500,1800)

    env("OSDLocalAdminPassword") = Name

    When the step ran it displays the current value for the OSD task sequence Action variable: OSDLocalAdminPassword

    The inputbox popup was blank, by typing a password the apply windows settings would use it and the password got set.

    Then I replaced adminPassword=mypassword in the customsettings.ini file with: OSDLocalAdminPassword=MyPassword

    The popup inputbox showed MyPassword which successfully handed off to the next step: apply windows settings which successfully set the password.

    Now all I have to figure out is why the settings entrys in the MDTDB don't seem to include OSDLocalAdminPassword and or what task sequence uses the AdminPassword=MyPassword property.

    Saturday, January 31, 2015 6:42 PM
  • I wrote\borrowed\modified a powershell script that gets the value of the base 64 encoded AdminPassword variable from the MDTDB, decodes it and applys it to the OSDLocalAdminPassword.

    This runs after the gather step in my OSD task sequence and before the Apply Windows Settings step.

    I never figured out why this was necessary but it works. Here is the power shell script if anyone has a similar problem:


    Function Base64Decode($textBase64In)
        $b  = [System.Convert]::FromBase64String($textBase64In)
        $decoded = [System.Text.Encoding]::UTF8.GetString($b)
        return $decoded

    $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment

    $password = $tsenv.Value("AdminPassword")

    $base64out = Base64Decode($password)

    $tsenv.Value("OSDLocalAdminPassword") = $base64out


    • Marked as answer by David Best Tuesday, February 3, 2015 1:14 PM
    Monday, February 2, 2015 4:33 PM