Jorge Ocampo
asked on
powershell script help
any ideas on the below?
Get-ADUser -filter * -Properties DisplayName, EmailAddress, proxyAddresses, distinguishedName | select DisplayName, EmailAddress, proxyAddresses, distinguishedName | export-csv c:\temp\Email.csv –NoTypeInformation
i get the below in the export it has to do with multivalued attributes
proxyAddresses
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Microsoft.ActiveDirectory. Management .ADPropert yValueColl ection
Get-ADUser -filter * -Properties DisplayName, EmailAddress, proxyAddresses, distinguishedName | select DisplayName, EmailAddress, proxyAddresses, distinguishedName | export-csv c:\temp\Email.csv –NoTypeInformation
i get the below in the export it has to do with multivalued attributes
proxyAddresses
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
Microsoft.ActiveDirectory.
oBdA, your carriage return broken? :p
Ah, less than 255 chars, that's barely over two lines in the default PS console ...
Get-ADUser -Filter * -Properties DisplayName, EmailAddress, ProxyAddresses, DistinguishedName |
Select-Object -Property `
DisplayName,
EmailAddress,
@{Name='ProxyAddresses'; Expression={$_.ProxyAddresses -join ', '}},
DistinguishedName |
Export-Csv -Path C:\temp\Email.csv –NoTypeInformation
ASKER
@oBdA
didnt have any issues but is there a possible way to only get the primarysmtp "SMTP"
didnt have any issues but is there a possible way to only get the primarysmtp "SMTP"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window