Justin Chalfant's Blog

Justin Chalfant's Configuration Manager Blog

Set Local Computer Description During Configuration Manager Task Sequence

Set Local Computer Description During Configuration Manager Task Sequence

  • Comments 4
  • Likes

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
  • Any chance of using this to add the description to the machine object in AD also?

  • Thanks

  • @Les check out Jorgens blog post here for setting AD description: http://ccmexec.com/2012/01/set-computer-description-during-osd/

  • I have looked at the post you linked. I am wanting something that uses the %OSDComputerDescription% and writes it to the machine object in AD without having another box for techs to interact with. A script that simply uses the existing computer description and writes it to AD would also work. Everything i have is built around MDT standalone and doesn't play nice with SCCM.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment