PackageDeployment Module Help

Package Deployment Module

Read-IndexedWmiObject Cmdlet

Version 4.0.0.5

Read-IndexedWmiObject

Synopsis

Save the Properties of the nth Instance of a Class in a Variable

Syntax

Read-IndexedWmiObject [-Namespace] <String> [-Class] <String> [-Index] <Int32> [-ContinueOnError] [-NoCache] [-ResultVariablePrefix] <String> [-PropertyList] <String[]> [[-Context] <String>] [<CommonParameters>]

Description

Use this command to query available system and software components via WBEM/WMI.

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

-Index <Int32>

An index which outputs which of the found instances should be used. The index is zero-based, i.e., the first instance is the zero instance.

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

-NoCache <SwitchParameter>

#TODO#

Required

False

Position

Named

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".