Skip To Content
PowerShell Gallery
Toggle navigation
Packages
Publish
Documentation
Sign in
Search PowerShell packages:
OSD
21.6.22.1
Public/Test-IsVM.ps1
function
Test-IsVM
{
[
CmdletBinding
(
)
]
param
(
)
$Result
=
(
(
Get-CimInstance
-ClassName
CIM_ComputerSystem
)
.
Model
)
.
Trim
(
)
(
$Result
-match
'Virtual'
)
-or
(
$Result
-match
'VMware'
)
}