Tuesday, December 2, 2008

an old sys admin trick

I found this in my documents. I remember having to change win xp boxes description to something meaningful but too descriptive [for security reasons] it's tedious to do on individual machines and I am sure there are products out there that will do it with great ease but I liked this trick

In Windows, you can change the computer's description by editing the registry. You can do that using reg.exe (the command line utility) in the following manner,

reg add HKLM\SYSTEM\ControlSet001\Services\lanmanserver\parameters /v srvcomment /t reg_sz /d "New description"

reg add HKLM\SYSTEM\ControlSet003\Services\lanmanserver\parameters /v srvcomment /t reg_sz /d "New description"

You can also change a remote computer description in this manner,

reg add \\computername\HKLM\SYSTEM\ControlSet001\Services\lanmanserver\parameters /v srvcomment /t reg_sz /d "New description"

Note that reg add and what follows is one line. It's tested under Win XP, edit registry with caution. For more info, see Windows help on reg.exe