Tech Tip of the Week: Windows Powershell CMDlets RRS feed

  • General discussion

  • This week’s tech tip is for all you Windows PowerShell users.If you’re using PowerShell,  you may already know about CMDlets. If not, this post is sure to excite you, as CMDlets (pronounced “command-let”) are nifty commands that will ease the process of using Powershell. 

    Here are 5 CMDlets to get you started:

    1. Get-Recipient | Where {$_.EmailAddresses –match “”}
    This CMDlet will find an email address that is inside of the quotes.

    2. (Get-Mailbox) | ForEach {Set-Mailbox $_.Identity –RetentionPolicy “Contoso-Policy”}
    This CMDlet applies a single retention policy to all users.

    3. Get-MSOLUser | Set-MSOLUser –PasswordNeverExpires $true
    This sets all users passwords to never expire (Requires Azure Module)

    4. (Get-Recipient) | ForEach {Add-RecipientPermission –identity $_.PrimarySMTPAddress –trustee –AccessRights SendAs –Confirm:$Y}
    This gives a single mailbox SendAs rights to all other recipients (groups, mailboxes, external contacts).

    5. (Get-Mailbox) | ForEach {Enable-Mailbox –identity $_.PrimarySMTPAddress –Archive}
    This CMdlet turns on archiving for all mailboxes

    Try out these CMDlets and let us know what you think!

    Friday, April 11, 2014 9:30 PM