WINDOWS TIP SHEET: Get the NFO on Your Servers

Documenting your servers can be a PITA. Make a script do it and it becomes less painful.

By Jeffery Hicks

Whenever I build a new server, I like to document the baseline configuration. This comes in handy when troubleshooting a problem later. Having baseline documentation helps me identify what has changed. But I don't spend any time writing things down. I let the server tell me how it is configured by using Msinfo32.exe.

The Msinfo32 file is in the %Windir%\System32\DLLCache directory, but you can usually access it by clicking Start | Run and typing msinfo32. When you do that, you'll get a complete system summary. You'll get information on hardware, components, software, Internet Settings, Office applications and more. The program even has some diagnostic links under the Tools menu. But for me, the main purpose is documentation.

You can export the information to a text file, but I prefer to save the information in the tool's native .NFO format. Once saved, I can archive the file and reopen it at any time. If you want to automate the process you can generate the file from a command prompt:

%windir%\system32\dllcache\msinfo32.exe /nfo c:\%computername%.nfo

When you run this, it may take a minute or so for the report to be generated. Be patient.

Msinfo32 has provisions for connecting to remote computers and generating a report for those as well. You can connect to a remote computer from within the tool. Or, if you just want to create the report, run this at the command prompt:

%windir%\system32\dllcache\msinfo32.exe /computer DC01 /nfo c:\DC01.nfo

If you've been reading my column for any length of time you can probably see where I'm going. Let's document everything! With your handy text list of server names run this (single command) at a command prompt and in a short period, all your servers will be documented:

For /f %s in (servers.txt) do @%windir%\system32\dllcache\msinfo32.exe /computer %s /nfo \\Fileserver01\Data\%s.nfo

The command will appear to run quickly, but it will actually kick off an instance of Msinfo32 for each server in the list, so use this with a little caution. Obviously, change the destination path accordingly. Remember, %s is case-sensitive and that if you put this in a batch file change %s to %%s. You can leave %windir% as is.

Finally, I hope it goes without saying, but you'll need administrator privileges on any computer to get information. There are a few other hidden goodies in Msinfo32, but I'll leave those for you to discover.

Comment: http://mcpmag.com/columns/article.asp?editorialsid=1749#post

Jeffery Hicks MCSE, MCSA, MCT is a senior network engineer with Visory Group. He's a contributing editor to ScriptingAnswers.com and the coauthor, with Don Jones, of "Advanced VBScript for Microsoft Windows Administrators" (Microsoft Press, http://tinyurl.com/g63nf ) and "PowerShell TFM" (SAPIEN Press, http://tinyurl.com/2v7dye ). Jeff is also the creator of several popular, script-related tools used for network and Exchange administration. He maintains a blog at http://jdhitsolutions.blogspot.com .