As a Windows Server or Desktop Administrator, you’re constantly on the lookout for new and easy ways to gather information about computer systems and client OS.
WMIC – short for Windows Management Interface Command – is a simple command prompt tool that returns information about the system you are running it on. Below I have outlined five of the more useful, simple commands, all of which should work on Windows XP, Windows 7, and Windows Server.
1.) wmic csproduct get name,vendor,identifyingNumber – This will output the name of your computer model, the vendor, and the serial number – which for Dell products, is actually the service tag. This is incredibly useful when accessing a machine remotely.
2.) wmic diskdrive get name,size,model – This will output the model, name, and size of the installed disks, in bytes.
3.) wmic os list brief – This will output basic information about the operating system installed on the machine in question. The Serial Number, here, is the Windows License.
4.) wmic partition get name,bootable,size,type – This will output basic information on the partitions of the hard drive(s) on the machine.
5.) wmic memorychip list – This will output detailed information on the RAM chips installed on the machine.
On thing you will notice is that a lot of these longer commands, the command prompt wraps the text, making it hard to read (#5, especially). While you could expand the command prompt window, it might be easier to simply output the wmic results to text.
In order to do so, simply use the /output:”<filepath&name>” switch. Insert this right after the wmic, but before any other part of the command – for instance, wmic /output:”D:\result.txt” memorychip list will export the following:
This is only a small – very small – portion of things that can be done with wmic. There are a wealth of resources out there, including plenty of comprehensive guides such as this one – take a look and explore!