• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

Determine mailbox location exchange 2003

Have many exchange 2003 servers throughout the country and we are moving to 2007. We want to be a geographically correct as possible, like we don't want users in portland having a mailbox on a server in florida.  So what i'm trying to do is come up with a way to pull that info from AD either though a query or script.  Anyone have a suggestion?

Thanks
0
leadtheway
Asked:
leadtheway
  • 9
  • 9
1 Solution
 
Sushil SonawaneCommented:
You can achieve this using Exchage reporter plus software provide by manageengine.com

For download refer below link.
http://www.manageengine.com/products/exchange-reports/exchange-server-mailbox-reporting.html
0
 
leadthewayAuthor Commented:
I'd prefer something i didn't have to pay for. using tools already in AD/exchange/server 2003
0
 
SubsunCommented:
Checkout this script which will help you to pull the mailbox information..
http://mattellis.me/exchange-2003-mailbox-powershell-report/
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
leadthewayAuthor Commented:
so that runs on each exchange server?  that would take awhile  with over 60 exchange servers. or can that be run against ad?
0
 
SubsunCommented:
You can run it from any computer which has PowerShell and connectivity to exchange servers.. The script is for collecting data for single server at a time but can be modified to get data from multiple servers if required..
0
 
leadthewayAuthor Commented:
i was thinking maybe a ad query for exchange home server would probably work, just finding a way to get that output to a usable format
0
 
leadthewayAuthor Commented:
basically i need a report based per OU
0
 
SubsunCommented:
Do you mind a solution with Quest AD cmdlets?
http://www.quest.com/powershell/activeroles-server.aspx
0
 
SubsunCommented:
If yes, try this..
Get-QADUser -SizeLimit 0 -IncludedProperties msExchHomeServerName | ? {$_.msExchHomeServerName -ne $null} |
Select SamAccountName,PrimarySMTPAddress,DisplayName,ParentContainer,`
@{N="Mailbox Server";E={$_.msExchHomeServerName.split("/")[-1] -Replace"^cn=",""}} |
Export-Csv Report.csv -NoTypeInformation

Open in new window

0
 
leadthewayAuthor Commented:
i've used them for alot of ad stuff..  so what exactly does that script accomplish, looks like it will pull sam, primary email display and Ou?  what does this do @{N="Mailbox Server";E={$_.msExchHomeServerName.split("/")[-1] -Replace"^cn=",""}} |
0
 
SubsunCommented:
msExchHomeServerName looks like..
/o=First Organization/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=CONTOSO-MSG-01

Open in new window

@{N="Mailbox Server";E={$_.msExchHomeServerName.split("/")[-1] -Replace"^cn=",""}} is a custom property added to trim users msExchHomeServerName attribute and result only server name CONTOSO-MSG-01..
0
 
leadthewayAuthor Commented:
so say i didn't want to limit to one specific server, but return all exchange home servers for users in a particular OU?
0
 
SubsunCommented:
It's not limited to specific server. Also you can export complete user list to csv and filter using OU (ParentContainer) in excel . Else if you want to take only user report of single OU then use searchroot parameter with get-qaduser..
Get-QADUser -SearchRoot 'CN=Users,DC=Domian,DC=com' -SizeLimit 0 -IncludedProperties msExchHomeServerName | ? {$_.msExchHomeServerName -ne $null} |
Select SamAccountName,PrimarySMTPAddress,DisplayName,ParentContainer,`
@{N="Mailbox Server";E={$_.msExchHomeServerName.split("/")[-1] -Replace"^cn=",""}} |
Export-Csv Report.csv -NoTypeInformation

Open in new window

0
 
leadthewayAuthor Commented:
ok, tried to run that script, it just goes to next line and don't execute.

[PS] C:\Documents and Settings\adminjsm>Get-QADUser -SizeLimit 0 -IncludedProperties msExchHomeServerName | ? {$_.msExch
HomeServerName -ne $null} |
>> Select SamAccountName,PrimarySMTPAddress,DisplayName,ParentContainer,`
>> @{N="Mailbox Server";E={$_.msExchHomeServerName.split("/")[-1] -Replace"^cn=",""}} |
>> Export-Csv Report.csv -NoTypeInformation
>>
0
 
SubsunCommented:
Is it giving you any error? what is the content of Report.csv?
0
 
leadthewayAuthor Commented:
its not giving anythinng, it just keeps going to next line, it doesn't run
see how the rest of the code is after >>
0
 
SubsunCommented:
You just need to press Enter key until it return to prompt after copy pasting the script to Quest PS console.. Or save it in to .ps1 file and run the script..
0
 
leadthewayAuthor Commented:
i do press enter, and then all i get is another line with only >>
0
 
SubsunCommented:
As I said press enter until it return the prompt..
PS prompt..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 9
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now