PackageDeployment Module Help

Package Deployment Module

Read-WmiObject Cmdlet

Version 2.1.0.0

Read-WmiObject

Synopsis

Execute a Simple WMI Query

Syntax

Read-WmiObject [-Namespace] <String> [-Class] <String> [-Filter] <String> [-ContinueOnError] [-ResultVariablePrefix] <String> [-PropertyList] <String[]> [[-Context] <String>] [<CommonParameters>]

Description

Use this command to query available system and software components via WBEM/WMI. The instance is not responded to directly over a number, but instead through search criteria.

Parameters

-Class <String>

The relative path within the namespace which corresponds to the class names, for which you need to determine the number of present instances on the system.

Required

True

Position

1

Accepts pipeline input

False

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution in Service context.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
ComputerPerService: Execution in service context; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

5

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

-Filter <String>

Similar to a SQL statement, the WHERE clause is given a criterion in the query which must be met. If this criterion matches a found instance of the given class then the properties of this instance are used. However, a result amount is not given back, rather simply the first instance which matches this criterion. At the moment, only the equal sign is supported as criterion.

Required

True

Position

2

Accepts pipeline input

False

-Namespace <String>

Enter the Namespace to which the object should be connected and in which the class (object) is located.

Required

True

Position

0

Accepts pipeline input

False

-PropertyList <String[]>

The properties returned by the WMI query. Every property value is available through a variable. Example: prefix '_WMI_' and property 'Name' results in variable '_WMI_Name'.

Required

True

Position

4

Accepts pipeline input

False

-ResultVariablePrefix <String>

This entry gives the actual variable names (together with the properties). The prefix is placed before the variable names.

Required

True

Position

3

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".