EMS: Setting quotas on multiple mailboxes
I expected the following commands to allow me to set the ProhibitSendQuota on multiple mailboxes.get-mailbox j* |set-mailbox -identity $_.Identity -ProhibitSendQuota 100MBI am seeing an error message about identity being null for the set-mailbox cmdlet.The get-mailbox j* retrieves the mailboxes that I want. The set-mailbox cmdlet accepts pipeline input according to the Help file.Yet the simple pipeline doesn't work with any of $_.Guid, $_.ExchangeGuid or $_.Id as well as not working with $_.Identity.I must be missing something simple here.ThanksAndrew Watt
August 10th, 2006 12:01am
You don't need to pass in anything extra in a pipeline between nouns:
get-mailbox j* | set-mailbox -prohibitsendquota 100MB
The pipeline object already contains all the data you need, you don't need to tell set-mailbox what to operate against. Hope that helps, ~vivek
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2006 2:05am
Vivek,Thanks. Too simple for me. :)What is set-mailbox using as the implicit value for the -identity parameter in the second pipeline step? $_? Or something else? If something else, what is it using?The error message that if I use, for example, $_.Identity that the identity is null seems misleading. Isn't $_.Identity, for example, a valid value for the -identity parameter?It's convenient that I don't need to specify an identity. What puzzles me is when I attempt to supply what I expected to be a valid value for -identity that it doesn't work.ThanksAndrew Watt
August 10th, 2006 11:55am