Useful PowerShell commands for Office 365 Exchange Online

Almost every change you make in the graphical Office 365 administrative website runs a PowerShell command on the back end servers at Microsoft’s datacenters.  The Exchange management console since Exchange 2007 is no different.  Much more than what is available via graphical user interfaces can be done in PowerShell.  Some useful commands that I find myself running over and over when administrating Office 365 are below:
The very first thing you need to do is connect PowerShell to Exchange Online.  This help link from Microsoft explains everything you need to get connected and ready to enter commands.  Bookmark it, save it to OneNote, or copy the info to your computer.  You will need it every time you want to do anything in Exchange Online via PowerShell.
Here is a very comprehensive reference to the all the available PowerShell commands in Exchange Online.
1.   Let’s say you moved an account to Exchange Online and now want to convert it to something other than a regular mailbox.  Maybe the user left the company but you want to keep the mailbox without needing to continue to pay for an Office 365 license.  Or you want to convert a regular account to a resource account (conference room, equipment, etc.)
To convert a user/regular mailbox to a shared mailbox:
get-mailbox -identity [email protected] | set-mailbox -type “Shared”
To convert a shared mailbox to a user mailbox (remember to assign a 365 license after conversion):
get-mailbox -identity [email protected] | set-mailbox -type “Regular”
To convert a user/regular mailbox to a room mailbox:
get-mailbox -identity [email protected] | set-mailbox -type “Room”
To convert a user/regular mailbox to an equipment mailbox:
get-mailbox -identity [email protected] | set-mailbox -type “Equipment”
2.  To view information about the total number of recipients in your organization – including number of mailboxes, active mailboxes, contacts, and distribution groups:
Get-RecipientStatisticsReport
You will see an output similar to this:
These results update every 24 hours.  Active mailboxes are defined as mailboxes that have been logged into in the past 30 days.
3.   To quickly get a list of various settings about your organization:
Get-OrganizationConfig
This will display numerous settings and configuration parameters related to your Exchange Online configuration.  Information on public folder settings, mail tips, Exchange version, etc. can be found.
Here is a small sampling of the things that can be found: