PowerShell Quickie: Disable an Exchange Mailbox

Though this may very well be the shortest PowerShell Quickie that I could ever post, it might also be one of the most useful. Exchange administrators often have the need to disable a user’s mailbox for one reason or another, but having to use the GUI tools isn’t always the best use of time. Need to disable a user’s mailbox quickly from the command line? One very short line will do it:
Disable-Mailbox <mailboxID>PowerShell Quickie: Disable ActiveSync for All Mailboxes

By default, the ActiveSync protocol is enabled for all users in an Exchange organization, whether or not they even have a mobile device. As a security precaution, you may want to disable the protocol for all mailboxes, and enable it only for select users. The following PowerShell Quickie will disable ActiveSync for all existing mailboxes:
get-Mailbox | set-CASMailbox -ActiveSyncEnabled:$FalseDon’t forget to go back and enable ActiveSync for any user that needs it!