ActiveDirectoryAliases.

AddUser(ICakeContext, string, string, UserSettings) Method

Summary

Creates a new user in the specified active directory.

Syntax

public static void AddUser(this ICakeContext context, string samAccountName, string ouDistinguishedName, UserSettings settings)

Examples

CreateUser("cake-user", "cake-group", new UserSettings { 
    LoginName = "domainAdmin", 
    Password = "adminPassword", 
    DomainName = "Cake.net"});

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.
samAccountName string The SAM account name of new user.
ouDistinguishedName string The distinguished name of the OU.
settings UserSettings The user settings.

Return Value

Type Description
void