Hi Team.
Hoping someone may be able to help. I have this script that connects in to ARS and pulls out the SamAccountName , and the first name and last name of the Secretary. That works. However i am unable to do the same for the seeAlso attribute which is a DN attribute like Secretary
Its driving me nuts. Any suggestions?
Thanks in advance
Connect-QADService -Service "AR-SERVICE-NAME" -Proxy $OUName = "OU-DN-HERE" $CSVName = "C:\Export.csv" $Report = @() foreach ($user in (Get-QADUser -SearchRoot $OUName -SizeLimit 0 -IncludedProperties Secretary , seeAlso )) { try { $Secretary = Get-QADUser $user.Secretary -ErrorAction Stop $sName = "$($Secretary.GivenName) $($Secretary.SN)" } catch { $sName = '' } try { $ADSeeAlso = Get-QADUser $user.seeAlso -ErrorAction Stop $sADSeeAlso = "$($ADSeeAlso.GivenName) $($ADSeeAlso.SN)" } catch { $sADSeeAlsoe = '' } $Report += New-Object PSObject -Property @{ 'samaccountname' = $user.SamAccountName 'Secretary' = $sName 'seeAlso' = $sADSeeAlso } } $Report | Select-Object samaccountname , Secretary , seeAlso | Export-Csv $CSVName -NoTypeInformation -Force