jahhan
asked on
Powershell script to display Exchange 2003 Mailboxes by Location
I am currently running the following script to display the number of mailboxes that exist in the Exchange 2003 environment:
$servers='server01'#, 'server02'
$outfile="c:\scripts\serve rbylocatio n.csv"
Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer $servers `
| select-object MailboxDisplayName,Size,Se rverName,S torageGrou pName,Stor eName `
| export-csv $outfile -notype
What do I need to do to add in the AD object of physicaldeliveryofficename ?
What I would like to do is have the option to sort my results by location.
$servers='server01'#, 'server02'
$outfile="c:\scripts\serve
Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer $servers `
| select-object MailboxDisplayName,Size,Se
| export-csv $outfile -notype
What do I need to do to add in the AD object of physicaldeliveryofficename
What I would like to do is have the option to sort my results by location.
ASKER
I tried that but when I execute the script that column is blank.
Do you get the same thing if physicaldeliveryofficename is the 1st object?
ASKER
Yes and the same outcome.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
e.g.
$servers='server01'#, 'server02'
$outfile="c:\scripts\serve
Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer $servers `
| select-object MailboxDisplayName,Size,Se
| export-csv $outfile -notype