API Reference
ProvisioningHelper
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
- Delegate used to create user accounts.
- computerCreator System.Func{System.String,System.String,System.DirectoryServices.DirectoryEntry} = null
- Delegate used to create computer accounts.
- groupCreator System.Func{System.String,System.String,ADPlayground.GroupScope,System.Boolean,System.DirectoryServices.DirectoryEntry} = null
- Delegate used to create group accounts.
- ouExists System.Func{System.String,System.Boolean} = null
- Delegate used to verify the existence of an organizational unit.
- computerCreatorWithOptions System.Func{System.String,System.String,ADPlayground.DirectoryComputerCreateOptions,System.DirectoryServices.DirectoryEntry} = null
- Delegate used to create computer accounts with optional typed attributes.
- userCreatorWithOptions System.Func{System.String,System.String,ADPlayground.DirectoryUserCreateOptions,System.DirectoryServices.DirectoryEntry} = null
- Delegate used to create user accounts with optional typed attributes.
- groupCreatorWithOptions System.Func{System.String,System.String,ADPlayground.DirectoryGroupCreateOptions,System.DirectoryServices.DirectoryEntry} = null
- Delegate used to create group accounts with optional typed attributes.
Methods
public DirectoryEntry CreateComputer(String samAccountName, String organizationalUnit) #DirectoryEntryCreates a computer account in the specified organizational unit.
Parameters
- samAccountName System.String
- sAMAccountName of the computer.
- organizationalUnit System.String
- Distinguished name of the organizational unit.
Returns
The created DirectoryEntry instance.
public DirectoryEntry CreateComputer(String samAccountName, String organizationalUnit, DirectoryComputerCreateOptions options) #DirectoryEntryCreates a computer account in the specified organizational unit and applies optional typed attributes.
Parameters
- samAccountName System.String
- sAMAccountName of the computer.
- organizationalUnit System.String
- Distinguished name of the organizational unit.
- options ADPlayground.DirectoryComputerCreateOptions
- Optional typed/custom attributes to apply on the created account.
Returns
The created DirectoryEntry instance.
public DirectoryEntry CreateGroup(String samAccountName, String organizationalUnit, GroupScope scope = Global, Boolean securityEnabled = true) #DirectoryEntryCreates a group account in the specified organizational unit.
Parameters
- samAccountName System.String
- sAMAccountName of the group.
- organizationalUnit System.String
- Distinguished name of the organizational unit.
- scope ADPlayground.GroupScope = Global
- Group scope.
- securityEnabled System.Boolean = true
- Indicates whether the group is security-enabled.
Returns
The created DirectoryEntry instance.
public DirectoryEntry CreateGroup(String samAccountName, String organizationalUnit, DirectoryGroupCreateOptions options) #DirectoryEntryCreates a group account in the specified organizational unit and applies optional typed attributes.
Parameters
- samAccountName System.String
- sAMAccountName of the group.
- organizationalUnit System.String
- Distinguished name of the organizational unit.
- options ADPlayground.DirectoryGroupCreateOptions
- Optional typed/custom attributes to apply on the created account.
Returns
The created DirectoryEntry instance.
public DirectoryEntry CreateUser(String samAccountName, String organizationalUnit) #DirectoryEntryCreates a user account in the specified organizational unit.
Parameters
- samAccountName System.String
- sAMAccountName of the user.
- organizationalUnit System.String
- Distinguished name of the organizational unit.
Returns
The created DirectoryEntry instance.
public DirectoryEntry CreateUser(String samAccountName, String organizationalUnit, DirectoryUserCreateOptions options) #DirectoryEntryCreates a user account in the specified organizational unit and applies optional typed attributes.
Parameters
- samAccountName System.String
- sAMAccountName of the user.
- organizationalUnit System.String
- Distinguished name of the organizational unit.
- options ADPlayground.DirectoryUserCreateOptions
- Optional typed/custom attributes to apply on the created account.
Returns
The created DirectoryEntry instance.