Share via


RegisterWmiEventCommand.Query Property

Gets and sets the value of the Query parameter of the Register-WmiEvent cmdlet. This property is introduced in Windows PowerShell 2.0.

Namespace: Microsoft.PowerShell.Commands
Assembly: Microsoft.PowerShell.Commands.Management (in Microsoft.PowerShell.Commands.Management.dll)

Usage

'Usage
Dim instance As RegisterWmiEventCommand
Dim value As String

value = instance.Query

instance.Query = value

Syntax

'Declaration
<ParameterAttribute(Position:=0, Mandatory:=True, ParameterSetName:="query")> _
Public Property Query As String
[ParameterAttribute(Position=0, Mandatory=true, ParameterSetName="query")] 
public string Query { get; set; }
[ParameterAttribute(Position=0, Mandatory=true, ParameterSetName=L"query")] 
public:
property String^ Query {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_Query ()

/** @property */
public void set_Query (String value)
public function get Query () : String

public function set Query (value : String)

Property Value

A String object that contains a query in WMI Query Language (WQL) that identifies the WMI event class.

Remarks

This topic is included in this SDK for completeness only. For more information about this cmdlet, see Register-WmiEvent in the Microsoft TechNet library.

For Help at the command line, type:

get-help register-wmievent

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

RegisterWmiEventCommand Class
RegisterWmiEventCommand Members
Microsoft.PowerShell.Commands Namespace

Other Resources

Windows PowerShell SDK