as title, for an OU i would just use a simple script block like this -
$OUpath = 'ou=Managers,dc=enterprise,dc=com'
$ExportPath = 'c:\data\users_in_ou1.csv'
Get-ADUser -Filter * -SearchBase $OUpath | Select-object
DistinguishedName,Name,UserPrincipalName | Export-Csv -NoType $ExportPath
but with a managed unit, the commands dont line up. ive used Get-QAD user and -proxy but fails.
any tried and tested code for a simple export?