How To Change Comment Field For Multiple Servers

The "Comment Field" which is located at My Computer simplifies the identification of a Windows Computer. This is generally called "Computer Description". By just looking at the Computer Description you can identify the Server role. This article explains how you can set this field for multiple computers using a single command.

As an example, you have 100 IIS Servers in your organization but when you look at two-three IIS servers (My Computer property) it says something else or nothing. As a manual process it may take some considerable time for 100 servers. You can use the below steps to accomplish this:

  • Create a text file. Name it IISSRV.TXT and put all the IIS Server names in it.
  • Next run the following command from a computer which is reachable to all IIS Servers mentioned in the IISSRV.TXT file.

FOR /F "Tokens=*" %L IN (C:\IISSRV.TXT) DO REG.EXE Add \\%L\HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v srvcomment /t REG_SZ /d "IIS Infrastructure Server"

The above command runs against each server mentioned in the IISSRV.TXT and set a registry entry (srvcomment). This registry key holds the Computer Description text.

 

About The Author

Leave a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top