Skip to content

Function CimObject

Chris Hunt edited this page May 23, 2016 · 5 revisions

CimObject

SYNOPSIS

Test the value of a CimObject Property.

SYNTAX

CimObject [-ClassName] <String> [-Property] <String> [-Should] <ScriptBlock> [<CommonParameters>]

DESCRIPTION

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

PARAMETERS

-ClassName <String>
    Specifies the name of the CIM class for which to retrieve the CIM instances.
    
-Property <String>
    Specifies an instance property to retrieve.
    
-Should <ScriptBlock>
    A Script Block defining a Pester Assertion.
    
<CommonParameters>
    This cmdlet supports the common parameters: Verbose, Debug,
    ErrorAction, ErrorVariable, WarningAction, WarningVariable,
    OutBuffer, PipelineVariable, and OutVariable. For more information, see 
    about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 

Example 1

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

Example 2

PS C:\>CimObject root\StandardCimv2\MSFT_NetOffloadGlobalSetting ReceiveSideScaling { Should Be Enabled }

Clone this wiki locally