To list all users in a OU, we can get it using Get-ADUser cmdlet. See the example below. (replace OU path in LDAP format to your own stuff and “Import-Module ActiveDirectory” before you run it).
Get-ADUser -Filter * -SearchBase “cn=Users,dc=company,,dc=com” -properties title, department| Select-Object name,title,department
Now what if you want everything (Users, Groups, Contacts, etc.,) from an OU. To get everything from a OU, use Get-ADObject cmdlet. See example below.
Get-ADObject -Filter * -SearchBase “cn=Users,dc=company,dc=com” -properties description | Select-Object name, objectclass, description
Enjoy!!!