ComputerPrincipal.FindByExpirationTime 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.
Returns a PrincipalSearchResult<T> collection of ComputerPrincipal objects that have an expiration time within the specified date and time range.
public:
static System::DirectoryServices::AccountManagement::PrincipalSearchResult<System::DirectoryServices::AccountManagement::ComputerPrincipal ^> ^ FindByExpirationTime(System::DirectoryServices::AccountManagement::PrincipalContext ^ context, DateTime time, System::DirectoryServices::AccountManagement::MatchType type);
public static System.DirectoryServices.AccountManagement.PrincipalSearchResult<System.DirectoryServices.AccountManagement.ComputerPrincipal> FindByExpirationTime (System.DirectoryServices.AccountManagement.PrincipalContext context, DateTime time, System.DirectoryServices.AccountManagement.MatchType type);
static member FindByExpirationTime : System.DirectoryServices.AccountManagement.PrincipalContext * DateTime * System.DirectoryServices.AccountManagement.MatchType -> System.DirectoryServices.AccountManagement.PrincipalSearchResult<System.DirectoryServices.AccountManagement.ComputerPrincipal>
Public Shared Function FindByExpirationTime (context As PrincipalContext, time As DateTime, type As MatchType) As PrincipalSearchResult(Of ComputerPrincipal)
Parameters
- context
- PrincipalContext
The PrincipalContext that specifies the server or domain against which operations are performed.
- time
- DateTime
A DateTime structure that is used in conjunction with the MatchType to filter search results.
Returns
A PrincipalSearchResult<T> that contains one or more ComputerPrincipal objects that match the search parameters, or an empty collection if no matches are found.
Remarks
The time will default to UTC. If you want to specify the time in local time, then specify the Kind property of the time
object as Local.