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.
Any chance of using this to add the description to the machine object in AD also?
@Les check out Jorgens blog post here for setting AD description:
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.