Set Local Computer Description During Configuration Manager Task Sequence


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.


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.


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


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


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 (5)
  1. Ed (DareDevil57) says:


  2. @Les check out Jorgens blog post here for setting AD description:

  3. Odyssey_2011 says:

    Any chance of using this to add the description to the machine object in AD also?

  4. Odyssey_2011 says:

    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.

  5. Miguel says:

    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?

Comments are closed.

Skip to main content