Active Directory User Management using Windows PowerShell

990 Words2 Pages

There is no iota of doubt that Windows PowerShell gives more control than the traditional Windows tools to manage the Active Directory. This fact inspires the Administrators to stick with command line tool instead of using the Active Directory Users and Computers. Let us have a look at AD user management through Windows PowerShell. Here, we’ll learn how to create and remove the users using the PowerShell CMDlets.
Creating a Single User
Following is the New-ADUser CMDlet for creating a user through PowerShell.
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”

Figure: CMDlet to create a User
Following is a description of some of the parameters provided in the above CMDlet.
1. 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.
2. DisplayName – specifies the name to be displayed.
3. Surname – specifies the surname of the user.
4. 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 –AsSecureString “Message”)
5. Enabled – specifies whether the new user will be enabled or disabled. If you’re not providing the password, then the user will be disabled by default. You can provide $true for true and $false for false.
6. Path – specifies the path of...

... middle of paper ...

...Active Directory Manager (LADM) appears as a one-stop solution for managing the Active Directory. You can easily manage users, groups, and computers either individually or in bulk with a friendly GUI. Moreover, you can manage multiple domains’ Active Directory environments from its centralized platform and generate different kinds of audit report to satisfy the compliances. One more added advantage is that the trial version of Lepide Active Directory Manager is available free for complete one year for one domain.
Conclusion
Windows PowerShell offers more control than other Windows inbuilt methods to manage the Active Directory environment. Here, we’ve discussed just a few CMDlets for user management. One can also use the free trial version of Lepide Active Directory Manager to have granular control over Active Directory to manage the objects individually or in bulk.

More about Active Directory User Management using Windows PowerShell

Open Document