ScottPletcher (9/28/2012)
You could try:
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
If that doesn't work, there are SERVERPROPERTY parameters that aren't documented: you might try poking around for some of those and see if any of them help :-).
That doesn't seem to work on my VMs. I don't think there is anything built into sql server that would give you that visability. I don't know that sql server would/should care that much at this point.
I did find from the following thread just typing systeminfo into a cmd line will tell you. But I'd imagine if a really clever admin could obscure basically anything about a machine, though I doubt they would as that usually means a lot more admin overhead.
http://serverfault.com/questions/109154/how-do-i-know-if-im-working-on-a-virtual-machine-or-not