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