I had a request from a previous post to share how we are changing the computer description during OSD. We currently use this to have our techs enter in the location of the computer to help with automating our inventory. Also, if anyone has a better way of doing this please feel free to contribute.
Also, in our environment the description does not filter back to AD it only remains local to the machine but YMMV as I haven't looked too far into that. The description still filters back in through a custom report so it achieves everything that we need it to.
1. Create a computer description TS variable
2. Include the following script as part of one your packages and execute it sometime before your OS install (we include all of our scripts in the MDT Toolkit package)
TSComputerDescPrompt.vbs
Dim oTaskSequence, strComputerDesc
Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment")
' The wscript.echo commands are logged in SMSTS.log for troubleshooting.
' They are not displayed to the end user.
sComputerDesc = InputBox ("Enter desired computer description." &VbCrLf & VbCrLf & "X Domain - Computer location example: BUILDING ROOM #" &VbCrLf &VbCrLf & "Domain - Tag Number example: 10-0454 or 106183","Computer Description",,,30)
oTaskSequence("OSDComputerDesc") = sComputerDesc
wscript.echo "Set Task Sequence variable OSDComputerDesc to: " & strComputerDesc
3. Execute this final script with another task sometime after the OS install, we do it right after.
TSComputerDesc.vbs
Dim objShell
Dim oTaskSequence, strComputerDesc
Set objShell = WScript.CreateObject ("WScript.shell")
Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment")
' The wscript.echo commands are logged in SMSTS.log for troubleshooting.
' They are not displayed to the end user.
strComputerDesc = oTaskSequence("OSDComputerDesc")
objShell.run "reg add HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters /v srvcomment /d " & strComputerDesc & " /f"
wscript.echo "Computer Description changed to: " & strComputerDesc
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.
I had a request from a previous post to share how we are changing the computer description during OSD. We currently use this to have our techs enter in the location of the computer to help with automating our inventory. Also, if anyone has a better way of doing this please feel free to contribute.
Also, in our environment the description does not filter back to AD it only remains local to the machine but YMMV as I haven't looked too far into that. The description still filters back in through a custom report so it achieves everything that we need it to.
1. Create a computer description TS variable
2. Include the following script as part of one your packages and execute it sometime before your OS install (we include all of our scripts in the MDT Toolkit package)
TSComputerDescPrompt.vbs
3. Execute this final script with another task sometime after the OS install, we do it right after.
TSComputerDesc.vbs
Share this post
Link to post
Share on other sites