다음을 통해 공유


Set Local Computer Description During Configuration Manager Task Sequence

Scenario:

I was working with a customer that wanted to set the Computer Description field during a task sequence. You can get this to work with standalone MDT by editing a few configuration files.

How to Set Computer Description:

I was unable to find a built in variable to accomplish this in ConfigMgr OSD like the OSDComputerName variable to name a machine. I ended up creating a variable called OSDComputerDescription in my scenario we were using MDT integration for User Driven Installation. We created a custom page to prompted the user to ender the Computer Description that mapped to the OSDComputerDescription variable.

Variable

You could use any method (Collection Variable, VBScript, Etc.) to set this variable.

In the task sequence we will need to add a “Run Command Line” step once we are in the full OS. This command line will run a NET CONFIG command to set the computer description.

The command to run is: cmd /c net config Server /SRVCOMMENT:"%OSDComputerDescription%"

This will set the computer description to what was defined in the OSDComputerDescription variable.

Run

I also created a condition so this “Run Command Line” step will only run if the OSDComputerDescription” variable exist.

Cond

If every runs correctly, you should have a computer with a local description set.

Desc

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of any included script samples are subject to the terms specified in the Terms of Use

Comments

  • Anonymous
    January 01, 2003
    Thanks
  • Anonymous
    January 01, 2003
    @Les check out Jorgens blog post here for setting AD description: http://ccmexec.com/2012/01/set-computer-description-during-osd/
  • Anonymous
    August 14, 2014
    Any chance of using this to add the description to the machine object in AD also?
  • Anonymous
    August 15, 2014
    The comment has been removed
  • Anonymous
    June 29, 2016
    I know this is old but hoping for a response... I don't understand how you are calling the custom page you made to collect the OSDComputerDescription variable? More specifically... What file or existing script are you opening in the UDI Wizard and where do you place the new files or save the changes made?