Link to home
Start Free TrialLog in
Avatar of junior049
junior049

asked on

Exchange 2007 - managing Distrbution group message size limits

I am trying to locate a cmdlet in Exchange Management Shell 2007  that will allow me to change the receive message size limit for all distribution groups that contain a particular keyword.  For example, I don't want to change the limit for all distribution groups.  I only want to change distribution groups that contain the word "Office" in their name:
Dallas Office
Austin Office
Houston Office
etc.

Is there an easy way to do this without having to manully update each DG?  I know I can use the Set-DistributionGroup Indentity "DG Name" -MaxReceiveSize 500KB command on each DG.  I'm just looking for a way to automate it using a keyword in the name of the DG.
ASKER CERTIFIED SOLUTION
Avatar of endital1097
endital1097
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
what you can probably do is

Get-DistributionGroup –Identity *office | Set-DistributionGroup -MaxReceiveSize 500KB
endital has faster and probably lighter fingers than me... :)
you probably should verify the "get-distributiongroup *office"   first returns the correct results
Avatar of FDiskWizard
I imagine since he only wants some, an asterisks won't be an option.

If you have the names in a spreadsheet, you could compose your command lines there.
ColumnA                                      ColumnB          ColumnC
Set-DistributionGroup Indentity     "DG Name001"    -MaxReceiveSize 500KB
Set-DistributionGroup Indentity     "DG Name002"    -MaxReceiveSize 500KB

Copy and paste the finished commands to notepad (trust me.. it will fix the formatting), then copy and paste from notepad to CMD window.
Avatar of junior049
junior049

ASKER

Awesome!  Thank you both for the quick response.  In the end, endital's solution was the correct one and works great!  I had originally tested Get-DistributionGroup –Identity *office but it kept throwing back a syntax error.  It appears EMS does not like the -Indentity switch when using the * wildcard.  
Thank you both for you quick responses and solutions!!
Learned something new today.... and it happens every day... :)
FDiskWizard,

Thank you for your solution as well.  I will make note of this for future reference as that also seems like a viable solution for limitiing to certain groups.  In this case, however, the asterisk works as I wanted to modify all DGs that contain the word "Office".

Thanks again for alternate solution!
@Mkris

I owe you an apology, your solution worked as well.  My fingers are neither light nor fast, and apparently are inaccurate too.  If I had spelled "identity" correctly, your solution would work as well.

Sorry for the confusion.