Skip to content

Function CimObject

Mark Wragg edited this page Jun 17, 2019 · 5 revisions

CimObject

SYNOPSIS

Test the value of a CimObject Property.

DESCRIPTION

Test the value of a CimObject Property. The Class can be provided with the Namespace. See Example.

PARAMETERS

Target [String]

[Parameter(
  Mandatory = $true,
  Position = 2,
  ParameterSetName = 'Set 1')]

Property [String]

[Parameter(
  Mandatory = $true,
  Position = 3,
  ParameterSetName = 'Set 1')]

Should [ScriptBlock]

[Parameter(
  Mandatory = $true,
  Position = 4,
  ParameterSetName = 'Set 1')]

Assertions

-Be, -BeExactly, -Match, -MatchExactly

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

CimObject Win32_OperatingSystem SystemDirectory { Should -Be C:\WINDOWS\system32 }

-------------------------- EXAMPLE 2 --------------------------

CimObject root/StandardCimv2/MSFT_NetOffloadGlobalSetting ReceiveSideScaling { Should -Be Enabled }