Sample chapter: Create and Manage Users and Groups in Active Directory

In this chapter from Deploying and Managing Active Directory with Windows PowerShell: Tools for cloud-based and hybrid environments, learn how to create and manage users, groups, and OUs; how to filter against the properties of users, groups, and computers to selectively act on the results of that filter; and how to add users to groups and move users and computers into an OU.

Now that we have a forest and domain, and we’ve got the basics of networking and name resolution sorted, the next step is to add some users to our domain. We’ll start with adding a simple user, interactively, and then create a bunch of users by using a script and a comma-separated values (CSV) file. We’ll create a new group and then add a group of users into that group, using a filter to ensure that we add the correct set of users. Then we’ll create a new organizational unit (OU) and move users and computers into the OU. Pretty basic stuff, really, but essential for any domain administrator.

Active Directory Windows PowerShell nouns used in this chapter:

  • ADUser
  • ADGroup
  • ADGroupMember
  • ADAccountPassword
  • ADPrincipalGroupMembership
  • ADObject
  • ADComputer

Other Windows PowerShell commands used in this chapter:

  • Import-CSV
  • ConvertTo-SecureString
  • Get-Command
  • Test-Path
  • Read-Host
  • Write-Host

Read the complete chapter here:

Comments (1)
  1. ITbatman says:

    Thanks for the article, it's really good for beginners who are learning AD. However, what most courses/articles/tutorials don't teach is how the native AD tools suck. They really do. We have been using them for ages and it was a big pain. We have recently deployed a solution that provides comprehensive management and adds a automation to the system and it was a massive improvement for the IT dept's life. If you're interested, it's called Adaxes ( )

    So, what I'm really trying to say, if you are learning how to use AD, you should know that the nightmare with native tools isn't always there. In a same way that not all image processing should be done through Paint. There are a lot of more sophisticated tools out there and there are no reasons at all why you shouldn't use (learn) them from the beginning

Comments are closed.

Skip to main content