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