Life of a Geek Admin

The Daily adventures of a true geek administrator

Life of a Geek Admin - The Daily adventures of a true geek administrator

Changing Windows Computer Description from a Command Prompt

By default the Windows OS installation doesn’t input a computer description. In most cases this is not an issues but, if you want to add one here’s how to do it. Typically the computer description is changed by using thew GUI in System > Advanced System Settings > Computer Description.

This same task can be completed on the command prompt with the net config command. the syntax is:

net config server /srvcomment:”Input my description”

example:

c:\> net config server /srvcomment:"My Super Fast Server"

You can verify the change by typing

c:\> net config server
Server Name                           \\win2008tst
Server Comment                        My Super Fast Server

Software version                      Windows Server 2008 R2 Enterprise

Server is active on
NetbiosSmb (win2008tst)

Server hidden                         No
Maximum Logged On Users               16777216
Maximum open files per session        16384

Idle session time (min)               15
The command completed successfully.

You can expand on this further by adding set command to prompt for a value or have it read from a file.

Reading value from a file

c:\> set /P cpdesc= <descpt.txt
c:\> net config server /srvcomment:"%cpdesc%"
c:\> set cpdesc=

Prompting for a Value

c:\> echo Enter a Computer Description and press enter
c:\> set /P cpdesc=
c:\> net config server /srvcomment:"%cpdesc%"
c:\> set cpdesc=

Reference: http://support.microsoft.com/kb/824386

Category: Windows

Your email address will not be published. Required fields are marked *

*

Switch to our mobile site