How to check if a machine is physical or virtual

Check System Information

Click Start → Write msinfo32 → press Enter

The System Manufacturer and System Model items will let you know whether the machine is physical or Virtual.

Use Powershell or Command Prompt

In Powershell you can use the following cmdlet get-wmiobject win32_computersystem | fl model


And in the Command Prompt, use this command systeminfo /s %computername% | findstr /c:"Model:" /c:"Host Name" /c:"OS Name"

Check All Servers in a Domain

Sometimes you might want to know this information about all servers in a domain, so how do you go about that? Simple, use the following Powershell script

import-module activedirectory
get-adcomputer -filter {operatingsystem -like "windows server*"} | select-object name | export-csv .\computers.txt -notypeinformation -encoding UTF8
(Get-Content .\computers.txt) | % {$_ -replace '"', ""} | out-file -FilePath .\computers.txt -force -encoding ascii
$computers= get-content .\computers.txt | select -Skip 1
Foreach($computer in $computers){systeminfo /s $computer | findstr /c:"Model:" /c:"Host Name" /c:"OS Name" | out-file -FilePath .\VirPhys.txt -append }

You will get an output like this in a file called VirPhys.txt (located in the same location as you ran the script)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: