ActiveDirectoryAliases.

FindUserPrincipalNameByProperty(ICakeContext, string, string, UserSettings) Method

Summary

Finds User Principal Name by Property Value.

Syntax

public static string FindUserPrincipalNameByProperty(this ICakeContext context, string propertyName, string propertyValue, UserSettings settings)

Examples

var upn = FindUserPrincipalNameByProperty("proxyAddresses", "[email protected]", new UserSettings { 
    LoginName = "domainAdmin", 
    Password = "adminPassword", 
    DomainName = "Cake.net" });

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.
propertyName string The property name to search against.
propertyValue string The property value to search.
settings UserSettings The settings.

Return Value

Type Description
string User Principal Name