This scripts lists all AD users in an OU
Get-ADUser -searchbase "OU=UK,DC=domain,DC=local" -Filter * -ResultSetSize 20000 | FT Name,SamAccountNameby
This scripts lists all AD users in an OU
Get-ADUser -searchbase "OU=UK,DC=domain,DC=local" -Filter * -ResultSetSize 20000 | FT Name,SamAccountNameby