Hoping someone can help me here, I'm writing a script to automate my mailbox 
move and I'm having trouble with a few parts.

At a high level, I'm moving from a EX2003 environment with no mailbox quotas to 
a EX2007SP1 environment with Quotas set @ the DB level.  I also have a target 
size of 50GB / DB so if I had 256MB quota's in place, that means I can get 
roughly ~191 users in that DB.

I'm feeding the script a .csv file with 2 columns, name, current mbx size.

The logic I'm trying to write is for the script to get the current mailbox 
count of the first DB - "DB01" and determine if it's less than the max number 
of mailboxes allowed for its particular quota limits. If it has room, move x 
number of mailboxes to meet its capacity, once complete, move to the next db 
and repeat.
This is the part I'm having trouble with, how do I determine the user count per 
db into a variable that can be used in a script?

I'm using this to grab my count per db: $dbcount = get-mailbox -server 
MyCMSName | Group -Property:Database | Select Name,Count | Sort -Property Name
How do I determine that DB01 has a Count Value of 40?

The other complication here is that we have a AD Forest with multiple child 
domains, Exchange is installed in one of these child domains.  I have recipient 
objects in the same child domain where Exchange is installed and 2 other child 
domains.  When I run the above cmd, it only returns the recipients from the 
same domain.  If I use the -DomainController parameter and specify a DC of the 
other domain, I get just the recipients in that domain.  Is it possible to 
widen the scope forest wide?  This makes it tough because I run a few items via 
the set-mailbox cmd in my script and this will always fail unless I specify the 
domain.


TIA,


- John Barsodi

~ Ninja Email Security with Cloudmark Spam Engine Gets Image Spam ~
~             http://www.sunbeltsoftware.com/Ninja                ~

Reply via email to