Help with double piping in Exchange Management Shell
Hi We have multiple Exchange 2007 SP3 servers in our organisation. They are named in the format <country>-<servername>, e.g. UK-Exch1, USA-Exch1, Japan-Exch1 etc I want to pull off a list of Exchange mailboxes which have a send limit of 500MB on mailbox server UK-Exch1, and then users with a send limit of 500MB on all UK servers (i.e. UK-Exch1, UK-Exch2, UK-Exch3 etc), and then users on a server list held on C:\Servers.csv I then want to set this limit to 750MB, again initially on UK-Exch1, then also on all UK Exchange servers, then on all servers listed in C:\Servers.csv Does anyone know how I can do this in EMS?
August 13th, 2011 6:14pm

Hi sheen 1990, pull off a list of Exchange mailboxes which have a send limit of 500MB on mailbox server UK-Exch1 you can use this command: get-mailbox –server UK-Exch1 –Resultsize unlimited | where-object{ $_.MaxSendSize –eq 500MB} users with a send limit of 500MB on all UK servers (i.e. UK-Exch1, UK-Exch2, UK-Exch3 etc), and then users on a server list held on C:\Servers.csv This you can follow these steps to achieve the goal: Create a csv file (callend UK Servers, saved at this path c:\UKServer), and server name saved in this format: Name UK-Exch1 UK-Exch2 UK-Exch3 Then run this command to list all users: Import-csv c:\UKServer.csv |foreach{get-mailbox –Server $_.Name –Resultsize unlimited| Where-object{$_MaxSendSize –eq 500MB}} If you want to list Users on a server list on C:\Servers.csv, you can just follow the above method to save in Server.csv, then use this command to list users: Import-csv c:\Server.csv |foreach{get-mailbox –Server $_.Name –Resultsize unlimited| Where-object{$_MaxSendSize –eq 500MB}} Set this limit to 750MB on mailboxes: Set-mailbox –identity username –MaxSendSize 750MB Set all mailboxes on one Server: Get-mailbox –Server ServerName –Resultsize unlimited| foreach{set-mailbox –identity $_.Name –MaxSendSize 750MB} If you want to on all the servers in c:\Server.csv, you can use this command: $mailboxes=import-csv c:\Server.csv| foreach {get-mailbox –Server $_.Name –Resultsize unlimited} $mailboxes|foreach{set-mailbox –identity $_.Name –MaxSendSize 750MB} Thanks, Evan
Free Windows Admin Tool Kit Click here and download it now
August 14th, 2011 2:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics