Mail Tips, For Loops and Powershell

Powershell gives Exchange admins a lot of nice little tricks to use. Exchange 2010 has a new feature in tool tips. You can use Powershell, to run a basic for loop, looping through a quick Get-Mailbox. Based on the output of the Get-Mailbox, you can get a list of all valid mailboxes for an organization. You can then execute a command, allowing you to run any mailbox command against every mailbox of an organization. In the following example, we’ll use the Set-MailBox to make a basic mail tip for all users:

foreach ($mailbox in (Get-Mailbox)) { Set-MailBox -Identity $mailbox -MailTip “Please send only legitimate emails” }

Comments are closed.