次の方法で共有


ManagementObjectSearcher.Scope プロパティ

オブジェクトを検索するスコープ (WMI 名前空間) を取得または設定します。

Public Property Scope As ManagementScope
[C#]
public ManagementScope Scope {get; set;}
[C++]
public: __property ManagementScope* get_Scope();public: __property void set_Scope(ManagementScope*);
[JScript]
public function get Scope() : ManagementScope;public function set Scope(ManagementScope);

プロパティ値

オブジェクトを検索するスコープ (名前空間)。

解説

このプロパティの値を変更すると、 ManagementObjectSearcher は新しいスコープに再バインドされます。

使用例

 
ManagementObjectSearcher s = new ManagementObjectSearcher();
s.Scope = "root\\MyApp";
   
[Visual Basic] 
Dim s As New ManagementObjectSearcher()
s.Scope = "root\MyApp"
   

[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

ManagementObjectSearcher クラス | ManagementObjectSearcher メンバ | System.Management 名前空間