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”


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=


One Response to “Changing Windows Computer Description from a Command Prompt”

  1. Adam Mann says:

    Very nice command! Thanks!! I wasn’t aware of that one in the “net” suite of commands but was rather using an overly complex WMI command in PowerShell which required about 5 lines to do the same thing.

    Nice looking blog too!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.