Active Directory User Management using Powershell Creating a Single User New-ADUser –SamAccountName “username” –DisplayName “username” – givenName “Username” –Surname “surname” –AccountPassword ( ReadHost –AsSecureString “Message”) –Enabled $true –Path ‘CN=Users , DC=Doc , DC=Com’ –CannotChangePassword $false –ChangePasswordAtLogon $true –PasswordNeverExpires $false - EmailAddress “email” –EmployeeID “ID” –Department “string” SamAccountName – Specifies the SAM Account name of the user. ”New-ADUser” command should have this parameter for creating a user. You can pass a string value in it. DisplayName – Specifies the name to be displayed. Surname – Specifies the surname of the user. AccountPassword – Specifies the account password for the user. However, the password has to be provided after executing the command as a secured string. The default value for this parameter would be as follows . –AccountPassword ( ReadHost –AsSecureStri...
Comments
Post a Comment