TestimoX

API Reference

Class

ProvisioningHelper

Namespace ADPlayground
Assembly ADPlayground

Helper methods for creating user and computer accounts with basic validation.

Inheritance

  • Object
  • ProvisioningHelper

Constructors

public ProvisioningHelper(Func<String, String, DirectoryEntry> userCreator = null, Func<String, String, DirectoryEntry> computerCreator = null, Func<String, String, GroupScope, Boolean, DirectoryEntry> groupCreator = null, Func<String, Boolean> ouExists = null, Func<String, String, DirectoryComputerCreateOptions, DirectoryEntry> computerCreatorWithOptions = null, Func<String, String, DirectoryUserCreateOptions, DirectoryEntry> userCreatorWithOptions = null, Func<String, String, DirectoryGroupCreateOptions, DirectoryEntry> groupCreatorWithOptions = null) #

Initializes a new instance of the ProvisioningHelper class.

Parameters

userCreator System.Func{System.String,System.String,System.DirectoryServices.DirectoryEntry} = null optionalposition: 0
Delegate used to create user accounts.
computerCreator System.Func{System.String,System.String,System.DirectoryServices.DirectoryEntry} = null optionalposition: 1
Delegate used to create computer accounts.
groupCreator System.Func{System.String,System.String,ADPlayground.GroupScope,System.Boolean,System.DirectoryServices.DirectoryEntry} = null optionalposition: 2
Delegate used to create group accounts.
ouExists System.Func{System.String,System.Boolean} = null optionalposition: 3
Delegate used to verify the existence of an organizational unit.
computerCreatorWithOptions System.Func{System.String,System.String,ADPlayground.DirectoryComputerCreateOptions,System.DirectoryServices.DirectoryEntry} = null optionalposition: 4
Delegate used to create computer accounts with optional typed attributes.
userCreatorWithOptions System.Func{System.String,System.String,ADPlayground.DirectoryUserCreateOptions,System.DirectoryServices.DirectoryEntry} = null optionalposition: 5
Delegate used to create user accounts with optional typed attributes.
groupCreatorWithOptions System.Func{System.String,System.String,ADPlayground.DirectoryGroupCreateOptions,System.DirectoryServices.DirectoryEntry} = null optionalposition: 6
Delegate used to create group accounts with optional typed attributes.

Methods

CreateComputer 2 overloads
public DirectoryEntry CreateComputer(String samAccountName, String organizationalUnit) #
Returns: DirectoryEntry

Creates a computer account in the specified organizational unit.

Parameters

samAccountName System.String requiredposition: 0
sAMAccountName of the computer.
organizationalUnit System.String requiredposition: 1
Distinguished name of the organizational unit.

Returns

The created DirectoryEntry instance.

public DirectoryEntry CreateComputer(String samAccountName, String organizationalUnit, DirectoryComputerCreateOptions options) #
Returns: DirectoryEntry

Creates a computer account in the specified organizational unit and applies optional typed attributes.

Parameters

samAccountName System.String requiredposition: 0
sAMAccountName of the computer.
organizationalUnit System.String requiredposition: 1
Distinguished name of the organizational unit.
options ADPlayground.DirectoryComputerCreateOptions requiredposition: 2
Optional typed/custom attributes to apply on the created account.

Returns

The created DirectoryEntry instance.

CreateGroup 2 overloads
public DirectoryEntry CreateGroup(String samAccountName, String organizationalUnit, GroupScope scope = Global, Boolean securityEnabled = true) #
Returns: DirectoryEntry

Creates a group account in the specified organizational unit.

Parameters

samAccountName System.String requiredposition: 0
sAMAccountName of the group.
organizationalUnit System.String requiredposition: 1
Distinguished name of the organizational unit.
scope ADPlayground.GroupScope = Global optionalposition: 2
Group scope.
securityEnabled System.Boolean = true optionalposition: 3
Indicates whether the group is security-enabled.

Returns

The created DirectoryEntry instance.

public DirectoryEntry CreateGroup(String samAccountName, String organizationalUnit, DirectoryGroupCreateOptions options) #
Returns: DirectoryEntry

Creates a group account in the specified organizational unit and applies optional typed attributes.

Parameters

samAccountName System.String requiredposition: 0
sAMAccountName of the group.
organizationalUnit System.String requiredposition: 1
Distinguished name of the organizational unit.
options ADPlayground.DirectoryGroupCreateOptions requiredposition: 2
Optional typed/custom attributes to apply on the created account.

Returns

The created DirectoryEntry instance.

CreateUser 2 overloads
public DirectoryEntry CreateUser(String samAccountName, String organizationalUnit) #
Returns: DirectoryEntry

Creates a user account in the specified organizational unit.

Parameters

samAccountName System.String requiredposition: 0
sAMAccountName of the user.
organizationalUnit System.String requiredposition: 1
Distinguished name of the organizational unit.

Returns

The created DirectoryEntry instance.

public DirectoryEntry CreateUser(String samAccountName, String organizationalUnit, DirectoryUserCreateOptions options) #
Returns: DirectoryEntry

Creates a user account in the specified organizational unit and applies optional typed attributes.

Parameters

samAccountName System.String requiredposition: 0
sAMAccountName of the user.
organizationalUnit System.String requiredposition: 1
Distinguished name of the organizational unit.
options ADPlayground.DirectoryUserCreateOptions requiredposition: 2
Optional typed/custom attributes to apply on the created account.

Returns

The created DirectoryEntry instance.