I\'m remoting desktop to windows servers in our Lab/datacenter. I have a requirement to figure out all our servers are virtual machines or physical servers programatically,
you can use this command in cmd or powershell
SYSTEMINFO
You will find a line with the following text (or similar):
System Manufacturer: VMware, Inc. System Model: VMware Virtual Platform