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

DirectoryEntry イベント


DirectoryEntry クラス

Active Directory 階層ノードまたはオブジェクトカプセル化する DirectoryEntry クラス

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

Public Class DirectoryEntry
    Inherits Component
Dim instance As DirectoryEntry
public class DirectoryEntry : Component
public ref class DirectoryEntry : public
 Component
public class DirectoryEntry extends Component
public class DirectoryEntry extends
 Component
解説解説

オブジェクトバインド、または属性読み取りおよび更新を行うには、このクラス使用しますヘルパー クラスと共にDirectoryEntry は、有効期間管理およびナビゲーション メソッドサポート提供します。これらには、子ノード作成削除名前の変更移動、および子の列挙含まれます。ノード変更したら、その変更コミットして、ツリー保存する必要があります詳細については、CommitChanges プロパティトピック参照してください

DirectoryEntry使用すると、スキーマ エントリから、通常のエントリと、すべてではありませんが一部情報アクセスできます

Active Directory 階層は、最大数千ノード格納します。各ノードは、ネットワーク プリンタまたはドメイン内のユーザーなどのオブジェクト表します企業ネットワークは、新し従業員採用されるたびに頻繁に変更されネットワーク プリンタコンピュータなどのオブジェクト追加されます。ADSI (Active Directory Service Interfaces) 技術使用すると、プログラムによって、これらのオブジェクトディレクトリ ツリー追加できます

階層内にディレクトリ エントリを作成するには、Children プロパティ使用しますChildren プロパティは、Add メソッド提供するコレクションです。これを使用して、現在バインドされている親ノード直下コレクションノード追加しますコレクションノード追加するときに、新しノードの名前と、そのノード関連付けるスキーマ テンプレートの名前を指定する必要があります。たとえば、"Computer" という名前のスキーマ使用して階層新しコンピュータ追加できます

このクラスには、ネットワーク トラフィック最適化するために役立つ属性キャッシュあります属性キャッシュ使用するには、UsePropertyCache プロパティトピック参照してください

DirectoryEntry コンポーネント関連付けられるクラスは、任意の Active Directory サービス プロバイダ使用できます現在のプロバイダには、IIS (Internet Information Services)、LDAP (Lightweight Directory Access Protocol)、NDS (Novell NetWare Directory Service)、WinNT などがあります

メモメモ

このクラス使用するには、Active Directory一般的な知識が必要です。詳細については、System.DirectoryServices 名前空間概要トピック参照してください

.NET Framework のセキュリティ.NET Frameworkセキュリティ
  • DirectoryServicesPermission  LinkDemand
継承階層継承階層
System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
      System.DirectoryServices.DirectoryEntry
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

DirectoryEntry コンストラクタ ()


DirectoryEntry コンストラクタ (String)

指定したパスにある Active Directoryノードバインドする DirectoryEntry クラス新しインスタンス初期化します。

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

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

パラメータ

path

DirectoryEntry(String)ディレクトリバインドするパスPath プロパティは、この値に初期化されます

使用例使用例

DirectoryEntry オブジェクト指定したパスディレクトリ エントリにバインドし、そのノードChildren プロパティ指定される各子エントリの Path プロパティ出力するコード例次に示します

Public Class PrintChildren
    
    'Entry point which delegates to C-style main Private Function.
    Public Overloads Shared
 Sub Main()
        Main(System.Environment.GetCommandLineArgs())
    End Sub
    
    Overloads Public Shared
 Sub Main(args() As String)
        Dim objDE As DirectoryEntry
        Dim strPath As String
 = "LDAP://DC=onecity,DC=corp,DC=fabrikam,DC=com"
        If args.Length > 0 Then
            strPath = args(1)
        End If 
        ' Create a new DirectoryEntry with the given path.
        objDE = New DirectoryEntry(strPath)
        
        Dim objChildDE As DirectoryEntry
        For Each objChildDE In
  objDE.Children
            Console.WriteLine(objChildDE.Path)
        Next objChildDE
    End Sub 'Main
End Class 'PrintChildren 

public class PrintChildren{
   public static void Main(String[]
 args)
   {
      DirectoryEntry objDE;
      String strPath="LDAP://DC=onecity,DC=corp,DC=fabrikam,DC=com";
      if(args.Length>0)strPath=args[1];
 
      // Create a new DirectoryEntry with the given path.
      objDE=new DirectoryEntry(strPath);
 
      foreach(DirectoryEntry objChildDE in
 objDE.Children)
        Console.WriteLine(objChildDE.Path);
   }
 }
int main()
{
    String^ args[] = Environment::GetCommandLineArgs();
    DirectoryEntry^ objDE;
    String^ strPath = "LDAP://DC=onecity,DC=corp,DC=fabrikam,DC=com";
    if(args->Length>1)
    {
        strPath=args[1];
    }

    // Create a new DirectoryEntry with the given path.
    objDE = gcnew DirectoryEntry(strPath);

    System::Collections::IEnumerator^ enum0 = objDE->Children->GetEnumerator();
    while (enum0->MoveNext())
    {
        DirectoryEntry^ objChildDE = safe_cast<DirectoryEntry^>(enum0->Current);
        Console::WriteLine(objChildDE->Path);
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
  • DirectoryServicesPermission  Demand
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

DirectoryEntry コンストラクタ (String, String, String)

DirectoryEntry クラス新しインスタンス初期化します。

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

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

DirectoryEntry コンストラクタ


DirectoryEntry コンストラクタ (String, String, String, AuthenticationTypes)

DirectoryEntry クラス新しインスタンス初期化します。

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

Public Sub New ( _
    path As String, _
    username As String, _
    password As String, _
    authenticationType As AuthenticationTypes _
)
Dim path As String
Dim username As String
Dim password As String
Dim authenticationType As AuthenticationTypes

Dim instance As New DirectoryEntry(path,
 username, password, authenticationType)
public DirectoryEntry (
    string path,
    string username,
    string password,
    AuthenticationTypes authenticationType
)
public:
DirectoryEntry (
    String^ path, 
    String^ username, 
    String^ password, 
    AuthenticationTypes authenticationType
)
public DirectoryEntry (
    String path, 
    String username, 
    String password, 
    AuthenticationTypes authenticationType
)
public function DirectoryEntry (
    path : String, 
    username : String, 
    password : String, 
    authenticationType : AuthenticationTypes
)

パラメータ

path
username

クライアント認証時に使用するユーザー名Username プロパティは、この値に初期化されます

password
authenticationType

AuthenticationTypes 値の 1 つ。AuthenticationType プロパティは、この値に初期化されます

.NET Framework のセキュリティ.NET Frameworkセキュリティ
  • DirectoryServicesPermission  Demand
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DirectoryEntry クラス
DirectoryEntry メンバ
System.DirectoryServices 名前空間
Path
Username
Password
AuthenticationTypes 列挙
AuthenticationType

DirectoryEntry コンストラクタ (Object)

指定したネイティブ Active Directory オブジェクトバインドする DirectoryEntry クラス新しインスタンス初期化します。

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

Public Sub New ( _
    adsObject As Object _
)
Dim adsObject As Object

Dim instance As New DirectoryEntry(adsObject)
public DirectoryEntry (
    Object adsObject
)
public:
DirectoryEntry (
    Object^ adsObject
)
public DirectoryEntry (
    Object adsObject
)
public function DirectoryEntry (
    adsObject : Object
)

パラメータ

adsObject

バインドするネイティブ Active Directory オブジェクトの名前。

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

DirectoryEntry プロパティ


パブリック プロパティパブリック プロパティ

( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ AuthenticationType 使用する認証種類取得または設定します
パブリック プロパティ Children Active Directory 階層でこのノードの子エントリを取得します
パブリック プロパティ Container  Component格納している IContainer を取得します。 ( Component から継承されます。)
パブリック プロパティ Guid DirectoryEntry の GUID取得します
パブリック プロパティ Name 基になるディレクトリ サービス命名されているオブジェクトの名前を取得します
パブリック プロパティ NativeGuid プロバイダ返す DirectoryEntryGUID取得します
パブリック プロパティ NativeObject ADSI オブジェクト取得します
パブリック プロパティ ObjectSecurity このエントリのセキュリティ記述子取得または設定します
パブリック プロパティ Options このエントリのプロバイダ固有のオプション取得します
パブリック プロパティ Parent Active Directory 階層でのエントリの親を取得します
パブリック プロパティ Password クライアント認証時に使用するパスワード設定します
パブリック プロパティ Path DirectoryEntryパス取得または設定します
パブリック プロパティ Properties この DirectoryEntry オブジェクトActive Directoryプロパティ取得します
パブリック プロパティ SchemaClassName この DirectoryEntry オブジェクトスキーマ クラスの名前を取得します
パブリック プロパティ SchemaEntry このエントリのスキーマ オブジェクト取得します
パブリック プロパティ Site  Component の ISite を取得または設定します。 ( Component から継承されます。)
パブリック プロパティ UsePropertyCache 操作を行うたびにキャッシュコミットするかどうかを示す値を取得または設定します
パブリック プロパティ Username クライアント認証時に使用するユーザー名取得または設定します
プロテクト プロパティプロテクト プロパティ
参照参照

関連項目

DirectoryEntry クラス
System.DirectoryServices 名前空間

DirectoryEntry メソッド


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

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Close DirectoryEntry オブジェクト閉じ、このコンポーネント関連付けられているシステム リソース解放します。
パブリック メソッド CommitChanges ディレクトリ エントリに加えられ変更を基になるディレクトリ ストア保存します
パブリック メソッド CopyTo オーバーロードされます。 このエントリのコピー作成します
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド DeleteTree Active Directory 階層からエントリとそのサブツリー全体削除します
パブリック メソッド Dispose オーバーロードされますDirectoryEntry オブジェクトによって使用されているリソース解放します。
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド Exists 指定したパスディレクトリ サービス実際のエントリを表しているかどうか確認します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド Invoke ネイティブ Active Directory オブジェクトメソッド呼び出します。
パブリック メソッド InvokeGet ネイティブ Active Directory オブジェクトからプロパティ取得します
パブリック メソッド InvokeSet ネイティブ Active Directory オブジェクトプロパティ設定します
パブリック メソッド MoveTo オーバーロードされます。 この DirectoryEntry移動します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド RefreshCache オーバーロードされます。 この DirectoryEntry オブジェクトプロパティ値をプロパティ キャッシュ読み込みます。
パブリック メソッド Rename この DirectoryEntry オブジェクトの名前を変更します
パブリック メソッド ToString  Component の名前を格納している String返します (存在する場合)。このメソッドオーバーライドできません。 ( Component から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

DirectoryEntry クラス
System.DirectoryServices 名前空間

DirectoryEntry メンバ

Active Directory 階層ノードまたはオブジェクトカプセル化する DirectoryEntry クラス

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


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ AuthenticationType 使用する認証種類取得または設定します
パブリック プロパティ Children Active Directory 階層でこのノードの子エントリを取得します
パブリック プロパティ Container  Component格納している IContainer を取得します。(Component から継承されます。)
パブリック プロパティ Guid DirectoryEntryGUID取得します
パブリック プロパティ Name 基になるディレクトリ サービス命名されているオブジェクトの名前を取得します
パブリック プロパティ NativeGuid プロバイダ返す DirectoryEntryGUID取得します
パブリック プロパティ NativeObject ADSI オブジェクト取得します
パブリック プロパティ ObjectSecurity このエントリのセキュリティ記述子取得または設定します
パブリック プロパティ Options このエントリのプロバイダ固有のオプション取得します
パブリック プロパティ Parent Active Directory 階層でのエントリの親を取得します
パブリック プロパティ Password クライアント認証時に使用するパスワード設定します
パブリック プロパティ Path DirectoryEntryパス取得または設定します
パブリック プロパティ Properties この DirectoryEntry オブジェクトActive Directoryプロパティ取得します
パブリック プロパティ SchemaClassName この DirectoryEntry オブジェクトスキーマ クラスの名前を取得します
パブリック プロパティ SchemaEntry このエントリのスキーマ オブジェクト取得します
パブリック プロパティ Site  Component の ISite を取得または設定します。(Component から継承されます。)
パブリック プロパティ UsePropertyCache 操作を行うたびにキャッシュコミットするかどうかを示す値を取得または設定します
パブリック プロパティ Username クライアント認証時に使用するユーザー名取得または設定します
プロテクト プロパティプロテクト プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Close DirectoryEntry オブジェクト閉じ、このコンポーネント関連付けられているシステム リソース解放します。
パブリック メソッド CommitChanges ディレクトリ エントリに加えられ変更を基になるディレクトリ ストア保存します
パブリック メソッド CopyTo オーバーロードされます。 このエントリのコピー作成します
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 (MarshalByRefObject から継承されます。)
パブリック メソッド DeleteTree Active Directory 階層からエントリとそのサブツリー全体削除します
パブリック メソッド Dispose オーバーロードされますDirectoryEntry オブジェクトによって使用されているリソース解放します。
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド Exists 指定したパスディレクトリ サービス実際のエントリを表しているかどうか確認します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド Invoke ネイティブ Active Directory オブジェクトメソッド呼び出します。
パブリック メソッド InvokeGet ネイティブ Active Directory オブジェクトからプロパティ取得します
パブリック メソッド InvokeSet ネイティブ Active Directory オブジェクトプロパティ設定します
パブリック メソッド MoveTo オーバーロードされます。 この DirectoryEntry移動します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド RefreshCache オーバーロードされます。 この DirectoryEntry オブジェクトプロパティ値をプロパティ キャッシュ読み込みます。
パブリック メソッド Rename この DirectoryEntry オブジェクトの名前を変更します
パブリック メソッド ToString  Component の名前を格納している String返します (存在する場合)。このメソッドオーバーライドできません。 (Component から継承されます。)
プロテクト メソッドプロテクト メソッド
パブリック イベントパブリック イベント
参照参照

関連項目

DirectoryEntry クラス
System.DirectoryServices 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からDirectoryEntryを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDirectoryEntryを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDirectoryEntry を検索

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

辞書ショートカット

すべての辞書の索引

「DirectoryEntry」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS