#$ous = 'Accounts,DC=ud1,DC=utility','Build,DC=ud1,DC=utility'

#$ous | ForEach {Get-QADUser -SearchBase $_ } | select-object DisplayName,samaccountname,@{n="GroupName";e={$group}} |export-csv c:\temp\OU_extracted.csv

#get-QADUser -sizelimit 0 -SearchRoot 'OU=Accounts,DC=ud1,DC=utility','OU=Build,DC=ud1,DC=utility' -Enabled |select-object DisplayName,samaccountname,OU,@{n="GroupName";e={$group}}|export-csv c:\temp\OU_extracted.csv


get-QADComputer -SizeLimit 0 -SearchRoot 'OU=SpecialistWorkstations,DC=ud1,DC=utility','OU=Workstations,DC=ud1,DC=utility','OU=WorkstationsW7,DC=ud1,DC=utility' ,'OU=Build,DC=ud1,DC=utility' -DontUseDefaultIncludedProperties `
-IncludedProperties samaccountname,dn,Name |
Where-Object  {$_.samaccountname -like "*" -and $_.dn -ne "*"} |
Select-Object samaccountname,dn,Name |Export-Csv C:\Computers.csv 
