GlobalCatalog.FindOne Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds a single global catalog server.
Overloads
FindOne(DirectoryContext) |
Finds a single global catalog server in the specified context. |
FindOne(DirectoryContext, LocatorOptions) |
Finds a single global catalog server in the specified context, allowing for additional search options. |
FindOne(DirectoryContext, String) |
Finds a single global catalog server in the specified context and site. |
FindOne(DirectoryContext, String, LocatorOptions) |
Finds a single global catalog server in the specified context and site, allowing for additional search options. |
FindOne(DirectoryContext)
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
Finds a single global catalog server in the specified context.
public:
static System::DirectoryServices::ActiveDirectory::GlobalCatalog ^ FindOne(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context);
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog FindOne (System.DirectoryServices.ActiveDirectory.DirectoryContext context);
static member FindOne : System.DirectoryServices.ActiveDirectory.DirectoryContext -> System.DirectoryServices.ActiveDirectory.GlobalCatalog
Public Shared Function FindOne (context As DirectoryContext) As GlobalCatalog
Parameters
- context
- DirectoryContext
A DirectoryContext object that contains the target and credentials to use for the search.
Returns
A GlobalCatalog object that represents the global catalog server found by the search.
Exceptions
No global catalog server was found.
context
is not valid.
context
is null
.
See also
Applies to
FindOne(DirectoryContext, LocatorOptions)
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
Finds a single global catalog server in the specified context, allowing for additional search options.
public:
static System::DirectoryServices::ActiveDirectory::GlobalCatalog ^ FindOne(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context, System::DirectoryServices::ActiveDirectory::LocatorOptions flag);
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog FindOne (System.DirectoryServices.ActiveDirectory.DirectoryContext context, System.DirectoryServices.ActiveDirectory.LocatorOptions flag);
static member FindOne : System.DirectoryServices.ActiveDirectory.DirectoryContext * System.DirectoryServices.ActiveDirectory.LocatorOptions -> System.DirectoryServices.ActiveDirectory.GlobalCatalog
Public Shared Function FindOne (context As DirectoryContext, flag As LocatorOptions) As GlobalCatalog
Parameters
- context
- DirectoryContext
A DirectoryContext object that contains the target and credentials to use for the search.
- flag
- LocatorOptions
A combination of one or more of the LocatorOptions members that defines the type of global catalog server to find.
Returns
A GlobalCatalog object that represents the global catalog server found by the search.
Exceptions
No global catalog server was found.
context
or flag
is not valid.
context
is null.
See also
Applies to
FindOne(DirectoryContext, String)
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
Finds a single global catalog server in the specified context and site.
public:
static System::DirectoryServices::ActiveDirectory::GlobalCatalog ^ FindOne(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context, System::String ^ siteName);
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog FindOne (System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteName);
static member FindOne : System.DirectoryServices.ActiveDirectory.DirectoryContext * string -> System.DirectoryServices.ActiveDirectory.GlobalCatalog
Public Shared Function FindOne (context As DirectoryContext, siteName As String) As GlobalCatalog
Parameters
- context
- DirectoryContext
A DirectoryContext object that contains the target and credentials to use for the search.
- siteName
- String
The name of the site to search for a global catalog server.
Returns
A GlobalCatalog object that represents the global catalog server found by the search.
Exceptions
No global catalog server was found.
context
or siteName
is not valid.
context
or siteName
is null
.
See also
Applies to
FindOne(DirectoryContext, String, LocatorOptions)
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
- Source:
- GlobalCatalog.cs
Finds a single global catalog server in the specified context and site, allowing for additional search options.
public:
static System::DirectoryServices::ActiveDirectory::GlobalCatalog ^ FindOne(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context, System::String ^ siteName, System::DirectoryServices::ActiveDirectory::LocatorOptions flag);
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog FindOne (System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteName, System.DirectoryServices.ActiveDirectory.LocatorOptions flag);
static member FindOne : System.DirectoryServices.ActiveDirectory.DirectoryContext * string * System.DirectoryServices.ActiveDirectory.LocatorOptions -> System.DirectoryServices.ActiveDirectory.GlobalCatalog
Public Shared Function FindOne (context As DirectoryContext, siteName As String, flag As LocatorOptions) As GlobalCatalog
Parameters
- context
- DirectoryContext
A DirectoryContext object that contains the target and credentials to use for the search.
- siteName
- String
The name of the site to search for a global catalog server.
- flag
- LocatorOptions
A combination of one or more of the LocatorOptions members that defines the type of global catalog server to find.
Returns
A GlobalCatalog object that represents the global catalog server found by the search.
Exceptions
No global catalog server was found.
context
, siteName
, or flag
is not valid.
context
or siteName
is null.