Skip to content
ShabazTech

Notes of an IT Pro

ShabazTech

Notes of an IT Pro

  • Microsoft Azure
    • Compute
    • Governance
    • Identity
    • Networking
    • Security
    • Storage
  • Microsoft Entra ID
    • Identity
      • Application Management
      • Governance
    • Security
      • Authentication
      • Conditional Access
    • Global Secure Access
      • Internet Access
      • Private Access
  • Microsoft Intune
    • Apps
      • Microsoft365 Apps For Enterprise
    • Devices
      • Windows Clients
    • Monitoring
    • Security
  • Microsoft 365
    • Defender XDR
    • Purview
  • Microsoft OnPrem
    • AD DS
    • Failover Clustering
    • Hyper-V
    • Powershell
    • SQL Server
      • SQL Server 2008R2
      • SQL Server 2012
      • SQL Server 2016
    • System Center Configuration Manager
      • SCCM 2012R2
    • Windows Clients
    • Windows Server
      • Windows Server 2008R2
      • Windows Server 2012
      • Windows Server 2012R2
      • Windows Server 2016
  • Citrix
    • XenApp 6.5
    • XenApp and XenDesktop 7.6 LTSR
    • XenApp and Xendesktop 7.15 LTSR
  • About The Author
  • Microsoft Azure
    • Compute
    • Governance
    • Identity
    • Networking
    • Security
    • Storage
  • Microsoft Entra ID
    • Identity
      • Application Management
      • Governance
    • Security
      • Authentication
      • Conditional Access
    • Global Secure Access
      • Internet Access
      • Private Access
  • Microsoft Intune
    • Apps
      • Microsoft365 Apps For Enterprise
    • Devices
      • Windows Clients
    • Monitoring
    • Security
  • Microsoft 365
    • Defender XDR
    • Purview
  • Microsoft OnPrem
    • AD DS
    • Failover Clustering
    • Hyper-V
    • Powershell
    • SQL Server
      • SQL Server 2008R2
      • SQL Server 2012
      • SQL Server 2016
    • System Center Configuration Manager
      • SCCM 2012R2
    • Windows Clients
    • Windows Server
      • Windows Server 2008R2
      • Windows Server 2012
      • Windows Server 2012R2
      • Windows Server 2016
  • Citrix
    • XenApp 6.5
    • XenApp and XenDesktop 7.6 LTSR
    • XenApp and Xendesktop 7.15 LTSR
  • About The Author
Close

Search

Subscribe
MicrosoftPowershellWindows ServerWindows Server 2008R2

How to check if a machine is physical or virtual

By Shabaz
March 27, 2014 2 Min Read
4
Updated on November 24, 2015



If you connect to a remote machine through remote desktop protocol, you might not always know whether that machine is virtual or physical. If you would like to find out whether the machine you have connected to is virtual or physical, there are several ways to go about that.

1. Check System Tray

The quickest method is to check in the system tray, usually you will find an icon for the utilities the manufacturer of the virtualization product, provide to enhance the performance of the virtual machine’s guest operating system. Such as VMware Tools.

virphys1 Icon for VMware Tools in the system tray.

2. Check Programs and Features in Control Panel

Another method is to check Programs and Features in Control Panel. You will find out if VMware Tools are installed or not.
virphys2

3. Check System Information

Click Start → Write msinfo32 → press Enter
virphys3
The System Manufacturer and System Model items will let you know whether the machine is physical or Virtual.

4. Use Powershell or Command Prompt

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

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

5. 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)
virphys7

As you can see, Server01, Server03 and Server05 are virtual machines, while Server02 and Server04 are physical ones.

Tags:

MicrosoftPowershellServer 2008R2Windows Server
Author

Shabaz

Follow Me
Other Articles
Previous

Installing Failover Clustering on Server 2008R2

Next

Moving subfolder of a shared folder, does not retain permissions

4 Comments
  1. Jeff says:
    April 24, 2016 at 17:15

    Excellent script! Saved me tons of time! Clicked a few ads on ur site, u definitely deserve the revenue lol 😀

  2. Howard says:
    August 17, 2016 at 18:23

    Excellent commands. I particularly like the systeminfo command because you can run it on any computer without having to remote into it.

    Thanks!

  3. Vimala says:
    April 12, 2018 at 19:57

    Great! Simple commands and got the expected output.
    Thanks!!

  4. Mohammed Azhar says:
    May 16, 2018 at 06:09

    Perfect ..!

Comments are closed.

Archives

Tags

Active Directory Citrix Failover Clustering Microsoft Powershell SCCM SCCM 2012R2 Server 2008R2 Server 2012 Server 2012R2 Server 2016 SQL Server Symantec VSF Test Labs Windows Clients Windows Server XenDesktop 7.6 LTSR Xendesktop 7.15 LTSR

Popular Posts

  • How to check if a machine is physical or virtual
  • Exporting multivalued attributes with Export-CSV cmdlet
  • Installing Remote Desktop License Server on Windows…
  • Configuring Remote Desktop Services Profile settings…
  • Installing Citrix XenApp and XenDesktop 7.15 LTSR
  • Enabling LDAPS with certificate from a 3rd party CA
  • Assigning ownership of files and folders with Takeown.exe
  • Retrieving User properties from Active Directory
  • SCCM 2012 R2 Client Installation
  • Citrix XenApp 6.5 Architectural Components
© 2014- 2026 — ShabazTech. All rights reserved.