Jump to content


bonVoyage

Set Local Admin Password During OSD TS

Recommended Posts

I have a MDT Task Sequence that deploys Windows 10.

I am trying to set the windows built in local administrator password during the OSD Task Sequence.

To make this a bit complex I have an exe that I pass the computer name to, which generates a password.

I want to take this and set it as the local admin password.

I have tried to set it through PowerShell using the OSD TS Variable:

$LocalAdminPass = & .\Password.exe $env:COMPUTERNAME | Out-String
$TSEnv = New-Object -COMObject Microsoft.SMS.TSEnvironment
$TSEnv.Value("OSDLocalAdminPassword") = "$LocalAdminPass"

This does not work.

Any suggestions?

 

Share this post


Link to post
Share on other sites

did you see this bit ?
 

 Specifies the local administrator password. This value is ignored if the Randomly generate the local administrator password and disable the account on all supported platforms option is enabled. 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.