Creating a User
       This topic explains how to use the Active Directory module for  Windows PowerShell to create a new user in Active Directory Domain  Services (AD DS).
Example
         The following example demonstrates how to create a new user  (U1) with a password (p@ssword) in an organizational unit (OU) (Test) in  the Fabrikam.com domain:
New-ADUser -SamAccountName U1 -Name "User 1" -AccountPassword (ConvertTo-SecureString -AsPlainText "p@ssw0rd" -Force) -Enabled $true -Path 'OU=Test,DC=FABRIKAM,DC=COM'
New-ADUser -SamAccountName U1 -Name "User 1" -AccountPassword (ConvertTo-SecureString -AsPlainText "p@ssw0rd" -Force) -Enabled $true -Path 'OU=Test,DC=FABRIKAM,DC=COM'
Additional information
         You can use the following parameters when you set many of the  common values that are associated with the creation of a new user in  AD DS:
- -AccountExpirationDate
 
- -AccountNotDelegated
 
- -AccountPassword
 
- -AllowReversiblePasswordEncryption
 
- -CannotChangePassword
 
- -ChangePasswordAtLogon
 
- -Enabled
 
- -PasswordNeverExpires
 
- -PasswordNotRequired
 
- -SmartcardLogonRequired
 
- -TrustedForDelegation 
 
 
- -DisplayName
 
- -GivenName
 
- -Initials
 
- -OtherName
 
- -Surname
 
- -Description 
 
 
- -City
 
- -Country
 
- -POBox
 
- -PostalCode
 
- -State
 
- -StreetAddress 
 
 
- -Company
 
- -Department
 
- -Division
 
- -EmployeeID
 
- -EmployeeNumber
 
- -Manager
 
- -Office
 
- -Organization
 
- -Title 
 
 
- -Fax
 
- -HomePhone
 
- -MobilePhone
 
- -OfficePhone 
 
 
- -EmailAddress
 
- -HomeDirectory
 
- -HomeDrive
 
- -HomePage
 
- -ProfilePath
 
- -ScriptPath 
 
 
- -Certificates
 
- -LogonWorkstations
 
- -PermittedLogonTimes
 
- -UserPrincipalName
 
- -ServicePrincipalNames
 
 
 
No comments:
Post a Comment