How to export users from selected OU and it's subtree using powershell?
Get-ADUser -filter * -SearchScope Subtree -SearchBase "OU=Users,OU=Company,DC=Contoso,DC=com"|select-object givenname,surname,samaccountname |export-csv c:\temp\Company_Users.csv
Get-ADUser -filter * -SearchScope Subtree -SearchBase "OU=Users,OU=Company,DC=Contoso,DC=com"|select-object givenname,surname,samaccountname |export-csv c:\temp\Company_Users.csv