Quantcast
Channel: Configuration Manager 2012 - Operating System Deployment forum
Viewing all articles
Browse latest Browse all 9126

Task sequence OSD script computer name

$
0
0

I have a script that runs at end of sequence that I want to read the current computer name on what the TS is deploying to and then assign this name to a variable. I have tried the following:

$TSEnv = New-Object -COMObject Microsoft.SMS.TSEnvironment
$TSEnv.value("OSDComputerName") = $ComputerName

But the script doesn't seem to work. Now I can successfully run it once computer is built and manually enter the computer name. I thought OSDComputerName is what SCCM uses to hold the current computer name on what the TS is running? The computer has a name and defined in Device Collection.

Anyone know what I am doing wrong?


Viewing all articles
Browse latest Browse all 9126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>