PowerShell Help - Exchange
Hey guys,
I've failed in my google searches here. I am looking for a PowerShell script for Exchange 2007 SP1 that will display all users' SMTP addresses? Not just the primary.
The end goal is to take this as a CSV and import it into another app.
thanks in advance,
I've failed in my google searches here. I am looking for a PowerShell script for Exchange 2007 SP1 that will display all users' SMTP addresses? Not just the primary.
The end goal is to take this as a CSV and import it into another app.
thanks in advance,
-Daniel
Comments
-
it_consultant Member Posts: 1,903VBScript to export SMTP proxy addresses Ant Drewery
You actually have to query AD for this - I think I used this script when I had to do this a year ago.
This one is specific to powershell.
http://unlockpowershell.wordpress.com/2010/01/27/powershell-get-mailbox-display-smtp-addresses/
Remember to add the "export-CSV" command or the old school '<<whatever.csv' should work too. -
RobertKaucher Member Posts: 4,299 ■■■■■■■■■■Use the commandlets that are provided for free from QUest Software:
PowerShell Commands (CMDLETs) for Active Directory by Quest Software
This is actually a trivial task with PoSh and the Quest commands.[PS] C:\Users\rkauche>Get-QADObject -SizeLimit 0 | where {$_.Email -ne $null} | select name, email | Export-Csv -NoTypeInformation .\users.csv
Edit: I just wanted to mention that if you use the Exchange commands you will only get the users who have mail boxes. This will be all users with regisered email addresses. My only concern being this does not fill your requirement of all email addresses. You might need to tweak it, but this is the general idea.