ManagementPathとは? わかりやすく解説

ManagementPath クラス

WMI (Windows Management Instrumentation) オブジェクトへのパス解析および構築するためのラッパー提供します

名前空間: System.Management
アセンブリ: System.Management (system.management.dll 内)
構文構文

Public Class ManagementPath
    Implements ICloneable
Dim instance As ManagementPath
public class ManagementPath : ICloneable
public ref class ManagementPath : ICloneable
public class ManagementPath implements ICloneable
public class ManagementPath implements ICloneable
使用例使用例

ManagementPath クラスWMI オブジェクトへのパス解析する方法の例を次に示します。この例で解析されパスは、クラスインスタンスへのパスです。

Imports System
Imports System.Management


Public Class Sample
    Public Overloads Shared
 Function _
        Main(ByVal args() As String)
 As Integer

        ' Get the WMI class path
        Dim p As ManagementPath = _
            New ManagementPath( _
            "\\ComputerName\root" & _
            "\cimv2:Win32_LogicalDisk.DeviceID=""C:""")

        Console.WriteLine("IsClass: " & _
            p.IsClass)
        ' Should be False (because it is an instance)

        Console.WriteLine("IsInstance: " & _
            p.IsInstance)
        ' Should be True

        Console.WriteLine("ClassName: " & _
            p.ClassName)
        ' Should be "Win32_LogicalDisk"

        Console.WriteLine("NamespacePath: " &
 _
            p.NamespacePath)
        ' Should be "ComputerName\cimv2"

        Console.WriteLine("Server: " & _
            p.Server)
        ' Should be "ComputerName"

        Console.WriteLine("Path: " & _
            p.Path)
        ' Should be "ComputerName\root\cimv2:
        ' Win32_LogicalDisk.DeviceId="C:""

        Console.WriteLine("RelativePath: " & _
            p.RelativePath)
        ' Should be "Win32_LogicalDisk.DeviceID="C:""

    End Function
End Class
using System;
using System.Management;

public class Sample 
{    
    public static void Main()
 
    {

        // Get the WMI class path
        ManagementPath p = 
            new ManagementPath(
            "\\\\ComputerName\\root" +
            "\\cimv2:Win32_LogicalDisk.DeviceID=\"C:\"");

        Console.WriteLine("IsClass: " +
            p.IsClass);
        // Should be False (because it is an instance)

        Console.WriteLine("IsInstance: " +
            p.IsInstance);
        // Should be True

        Console.WriteLine("ClassName: " +
            p.ClassName);
        // Should be "Win32_LogicalDisk"

        Console.WriteLine("NamespacePath: " +
            p.NamespacePath);
        // Should be "ComputerName\cimv2"

        Console.WriteLine("Server: " + 
            p.Server);
        // Should be "ComputerName"

        Console.WriteLine("Path: " +
            p.Path);
        // Should be "ComputerName\root\cimv2:
        // Win32_LogicalDisk.DeviceId="C:""

        Console.WriteLine("RelativePath: " +
            p.RelativePath);
        // Should be "Win32_LogicalDisk.DeviceID="C:""

    }
}
継承階層継承階層
System.Object
  System.Management.ManagementPath
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ManagementPath コンストラクタ ()


ManagementPath コンストラクタ (String)

特定パスの ManagementPath クラス新しインスタンス初期化します。

名前空間: System.Management
アセンブリ: System.Management (system.management.dll 内)
構文構文

public ManagementPath (
    string path
)
public:
ManagementPath (
    String^ path
)
public ManagementPath (
    String path
)
public function ManagementPath (
    path : String
)

パラメータ

path

オブジェクト パス

使用例使用例

ManagementPath クラスWMI オブジェクトへのパス解析する方法の例を次に示します。この例で解析されパスは、クラスインスタンスへのパスです。

Imports System
Imports System.Management


Public Class Sample
    Public Overloads Shared
 Function _
        Main(ByVal args() As String)
 As Integer

        ' Get the WMI class path
        Dim p As ManagementPath = _
            New ManagementPath( _
            "\\ComputerName\root" & _
            "\cimv2:Win32_LogicalDisk.DeviceID=""C:""")

        Console.WriteLine("IsClass: " & _
            p.IsClass)
        ' Should be False (because it is an instance)

        Console.WriteLine("IsInstance: " & _
            p.IsInstance)
        ' Should be True

        Console.WriteLine("ClassName: " & _
            p.ClassName)
        ' Should be "Win32_LogicalDisk"

        Console.WriteLine("NamespacePath: " &
 _
            p.NamespacePath)
        ' Should be "ComputerName\cimv2"

        Console.WriteLine("Server: " & _
            p.Server)
        ' Should be "ComputerName"

        Console.WriteLine("Path: " & _
            p.Path)
        ' Should be "ComputerName\root\cimv2:
        ' Win32_LogicalDisk.DeviceId="C:""

        Console.WriteLine("RelativePath: " & _
            p.RelativePath)
        ' Should be "Win32_LogicalDisk.DeviceID="C:""

    End Function
End Class
using System;
using System.Management;

public class Sample 
{    
    public static void Main()
 
    {

        // Get the WMI class path
        ManagementPath p = 
            new ManagementPath(
            "\\\\ComputerName\\root" +
            "\\cimv2:Win32_LogicalDisk.DeviceID=\"C:\"");

        Console.WriteLine("IsClass: " +
            p.IsClass);
        // Should be False (because it is an instance)

        Console.WriteLine("IsInstance: " +
            p.IsInstance);
        // Should be True

        Console.WriteLine("ClassName: " +
            p.ClassName);
        // Should be "Win32_LogicalDisk"

        Console.WriteLine("NamespacePath: " +
            p.NamespacePath);
        // Should be "ComputerName\cimv2"

        Console.WriteLine("Server: " + 
            p.Server);
        // Should be "ComputerName"

        Console.WriteLine("Path: " +
            p.Path);
        // Should be "ComputerName\root\cimv2:
        // Win32_LogicalDisk.DeviceId="C:""

        Console.WriteLine("RelativePath: " +
            p.RelativePath);
        // Should be "Win32_LogicalDisk.DeviceID="C:""

    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ManagementPath コンストラクタ


オーバーロードの一覧オーバーロードの一覧

名前 説明
ManagementPath () ManagementPath クラス新しい空のインスタンス初期化します。これは既定コンストラクタです。
ManagementPath (String) 特定パスManagementPath クラス新しインスタンス初期化します。
参照参照

関連項目

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

ManagementPath プロパティ


ManagementPath メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.ICloneable.Clone 現在のインスタンスコピーである新しオブジェクト作成します
参照参照

関連項目

ManagementPath クラス
System.Management 名前空間

ManagementPath メンバ

WMI (Windows Management Instrumentation) オブジェクトへのパス解析および構築するためのラッパー提供します

ManagementPath データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド ManagementPath オーバーロードされます。  
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.ICloneable.Clone 現在のインスタンスコピーである新しオブジェクト作成します
参照参照

関連項目

ManagementPath クラス
System.Management 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ManagementPath」の関連用語

ManagementPathのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ManagementPathのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS