How to find if windows is running on a vm or on a physical machine?

You could take a look through device manager, you'll most likely have quite a few VMWare of virtual drivers that you wouldn't get on a physical machine.

Also you could type systeminfo into a CMD window and if it says System Manufacturer: VMware, Inc. or similar instead of Microsoft Windows then you'll be able to work out of the set-up is virtual or not.


For windows, Click Start → Write msinfo32 → press Enter

System manufacturer info will display "VMWare. Inc" if it is a VMWare VM. Probably other VM platforms like Hyper-V, etc. will also fill this info.


Try this code:

@echo off
systeminfo > temp.txt
findstr /e "System Model:              Virtual Machine" temp.txt
del temp.txt
if errorlevel 1 (
    echo Physical machine

) else (
    echo Virtual machine
)