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?