Create an AD user using Quest cmdlets
<xource lang="text">
New-QADUser (Quest cmdlet)
Create a new user account.
Syntax
New-QADUser [-Name] String [-ParentContainer IdentityParameter] ADProperties -UserPassword String [-AccountExpires Nullable] [-PasswordNeverExpires] [-UserMustChangePassword] TerminalServiceProperties [-UserPassword String] Advanced_Options [-WhatIf] [-Confirm]
Key
-identity The Distinguished Name (DN), Canonical Name, GUID or, where applicable, the Domain\Name, UPN or SID of the object you wish to find.
-AccountExpires Set the account expiration date
-PasswordNeverExpires Set to True to never expire the account password
ADProperties Set object properties: [-Manager IdentityParameter] [-City String] [-Company String] [-Department String] [-Fax String] [-FirstName String] [-HomePhone String] [-Initials String] [-LastName String] [-MobilePhone String] [-Notes String] [-Office String] [-Pager String] [-PhoneNumber String] [-PostalCode String] [-PostOfficeBox String] [-SamAccountName String] [-StateOrProvince String] [-StreetAddress String] [-Title String] [-UserPrincipalName String] [-WebPage String] [-ProfilePath String] [-LogonScript String] [-Email String] ? [-Description String] [-DisplayName String]
Advanced_Options: [-ObjectAttributes ObjectAttributesParameter] [-ExcludedProperties String[]] [-IncludedProperties String[]] [-DeserializeValues] [-UseDefaultExcludedProperties] [-Proxy] [-UseGlobalCatalog] [-Service String] [-ConnectionAccount String] [-ConnectionPassword SecureString] [-Credential PSCredential] [-Connection ArsConnection]
Notes: By default New-QADUser will connect to any available domain controller with the credentials of the locally logged on user, to connect to a specific domain controller using a specific account, either use the advanced options (-Proxy/-Service/-ConnectionAccount) or use the Connect-QADService cmdlet to make the connection.
Examples
Create a user called 'user64'
PS C:> New-QADUser -name 'user64' -ParentContainer 'CN=Users,DC=SS64,DC=com' -samAccountName 'user64' -UserPassword 'Pass123'
Create a user called 'user65'
PS C:> $pass = read-host "Enter password" -AsSecureString
PS C:> New-QADUser -name 'user65' -ParentContainer 'CN=Users,DC=SS64,DC=com' -samAccountName 'user65' -UserPassword $pass
</source>