PowerShell is an incredibly powerful tool that if you’re not already using it and you’re a Windows Systems Administrator you will want to make it a priority. It is even more necessary if you are considering making the jump to Office 365. Microsoft does not give you access to the back end management software for Exchange (ESM), or SharePoint (Central Administration). Instead there is a chopped down web interface that provides you with the basics, and PowerShell is used to fill in the gaps. Gaps like, giving editing rights to a shared calendar and many more.
There are a few steps that you will need to take before you can start using PowerShell to manage your Office365 domain.
If you’re running Win7 or newer you will have PowerShell all ready installed. If not you will need to download and install it. You can get PowerShell 3.0 here:http://www.microsoft.com/en-us/download/details.aspx?id=34595. Warning, if you’re managing Exchange 2010 or earlier on premise with PowerShell you will need to use PowerShell 2.0.
Microsoft Online Services Sign-in Assistant:
You will need this small piece of software installed to be able to connect to Office365. It is also necessary for running the Lync client on your desktop. You can download them here:
32 bit – http://go.microsoft.com/fwlink/p/?linkid=236299
64 bit – http://go.microsoft.com/fwlink/p/?linkid=236300
Install Office 365 Cmdlets
The next thing that you will need is access to the Office365 cmdlets so that you will have the commands that you need to manage your domain. You will need to download and install these files:
32 bit – http://go.microsoft.com/fwlink/p/?linkid=236298
64 bit – http://go.microsoft.com/fwlink/p/?linkid=236297
Scripting your connection
Once you have finished the above you’re ready to actually connect to your Office365 domain. Here is the syntax that you will need to run:
$O365Cred = Get-Credential
$O365Session = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection
Import-PSSession $O365Session -AllowClobber
Connect-MsolService –Credential $O365Cred
Coming soon…. Basic administrative PowerShell command lets that will make it easy for you to complete simple admin tasks within O365.