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,
There is no easy way to tell if you're running in a bare metal or in a virtual computer, the best thing you can do is to get some hardware info and made an educated guess, for example, if the machine have a network adapter which contains Microsoft, VMware, Oracle, Hyper-V, Virtual or VirtualBox, most likely it's a virtual machine given that neither Microsoft, Oracle, or VMware fabricate network cards.
As you use C#, the class for retrieving this and other hardware info is ManagementClass, also there is this nice project that let you retrieve tons of info from your computer using ManagementClass.