Read-WmiObject
PackageDeployment Module Help |
Package Deployment Module |
Read-WmiObject Cmdlet |
Version 4.0.0.5 |
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. |
||||||
|
-Context <String> |
||||||
User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user. |
||||||
|
-ContinueOnError <SwitchParameter> |
||||||
Continues script execution in spite of errors in the respective command |
||||||
|
-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. |
||||||
|
-Namespace <String> |
||||||
Enter the Namespace to which the object should be connected and in which the class (object) is located. |
||||||
|
-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'. |
||||||
|
-ResultVariablePrefix <String> |
||||||
This entry gives the actual variable names (together with the properties). The prefix is placed before the variable names. |
||||||
|
<CommonParameters> |
For more information about common parameters, type "Get-Help about_CommonParameters". |