ManagementObjectSearcher::Scope Property

 

Gets or sets the scope in which to look for objects (the scope represents a WMI namespace).

Namespace:   System.Management
Assembly:  System.Management (in System.Management.dll)

public:
property ManagementScope^ Scope {
	ManagementScope^ get();
	void set(ManagementScope^ value);
}

Property Value

Type: System.Management::ManagementScope^

Returns a ManagementScope that contains the scope (namespace) in which to look for the WMI objects.

When the value of this property is changed, the ManagementObjectSearcher is re-bound to the new scope.

The scope (namespace) in which to look for objects.

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

The following example initializes a new instance of the ManagementObjectSearcher class with a specific query and then changes the scope of the instance.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: