WMIC Deprication

For some time Microsoft has been deprecating Windows Management Instrumentation Command line (WMIC). In one of the more recent versions of Windows the command was not there by default. It is still available in Control Panel, Turn Windows features on or off. I cannot say if that will always be the case.

The best option is to use PowerShell to run the commands needed.

In my case I mainly used WMIC to pull the serial number from the command line. using “WMIC BIOS get Serialnumber”. PowerShell can pull the same information as WMIC so it is just a matter of learning the new commands.

From the command line, the command “WMIC BIOS get Serialnumber” Would return the serial number for that computer.

In PowerShell the equivalent command is. “Get-WmiObject win32_bios | select Serialnumber“. This will return the service tag on that computer.

Another useful command, among hundreds, is “$env:computername” which will the computer name.

You can also use “Get-ComputerInfo” to get the serial number, computer name, and a host of additional information regarding your computer.