The Basics of Office 365 Powershell

Office 365 has basic administration tools in its web portal, but when it comes to doing anything much fancier than creating a user and editing some basic details, you will often find yourself having to use office 365 powershell. There are a vast amount of functions you can perform with powershell and many of them are covered in other articles on this blog, but for now I will cover the basics of getting powershell installed and logged in using Windows 7 or Windows 8.   The powershell install has a few easy prerequisites – MS Online Services Sign-in Assistant and Netframework 3.5. The first install is a small download, which can be accessed from the links below.

 

To download Microsoft Online Services Sign-in Assistant

32 bit version: http://go.microsoft.com/fwlink/p/?linkid=236299

64 bit version: http://go.microsoft.com/fwlink/p/?linkid=236300

 

Once downloaded, run the installer – it should be quick and simple. It looks like this:

Microsoft Online Sign-in Assistant Setup

MS Online Sign-in Assistant

 

 

 

 

 

 

 

 

Next you will need to install netframework 3.5. This is a windows component that can be installed from within control panel. Open up control panel, then (within classic view) navigate to “programs and features”. From there, click “turn windows features on or off” (on the left side of the window). This should open up a “windows features” box, and at the top of this check the box for “.NET Framework 3.5″ and hit “okay”. It will proceed to download and install it.

.Net Framework Install Windows 7

.Net Framework Install

 

 

 

 

 

 

 

Once this is installed, you are finally ready to install powershell itself. You can download it from the links below:   To download powershell for office 365, use these links:

32 bit version: http://go.microsoft.com/fwlink/p/?linkid=236298

64 bit version: http://go.microsoft.com/fwlink/p/?linkid=236297

 

Once you have downloaded it, it should be a relatively simple and quick installation.

Microsoft Online Powershell Assistant Install

Office 365 Powershell

 

 

 

 

 

 

 

 

 

Now that you finally have it installed, you can launch it. It will bring up a normal office 365 powershell terminal where you can begin typing commands. But before you can execute any commands on your Office 365, you will have to sign in. To do this, start with the commands below:

$cred=Get-Credential

Microsoft Online Powershell Get Credentials

Powershell – Get Credentials

 

 

 

 

 

 

 

Once you are presented with this window, type in your office 365 administrator credentials – the same ones you would use to sign into the web portal. Once you have entered those, run your next command:

Connect-MsolService -Credential $Cred

Microsoft Online Services Module for Windows Powershell

Office 365 Powershell

 

 

 

 

 

 

 

If you put this all in correctly, it should look like the window above and you should be ready to execute commands on your office 365!

, ,

Trackbacks/Pingbacks

  1. Set Office 365 Password to Never Expire | Office 365 for BusinessOffice 365 for Business - January 3, 2013

    […] http://www.office365forbiz.com/the-basics-of-office-365-powershell/ […]

  2. | Office 365 for BusinessOffice 365 for Business - January 7, 2013

    […] http://www.office365forbiz.com/the-basics-of-office-365-powershell/ […]

  3. Set the primary SMTP address in a DirSync Office 365 environmentOffice 365 for Business - January 9, 2013

    […] want to do is list all the mailbox properties. Connect to your Office 365 session by following the Basics of Office 365 powershell article if you don’t know […]

  4. Setting up Office 365 ADFS 2.0 and DirsyncOffice 365 for Business - January 21, 2013

    […] […]

  5. Two Ways to Reset Office 365 Passwords -Office 365 for Business - January 23, 2013

    […] by powershell command. To start, sign into powershell using the normal method as covered in this earlier article. Once you are in, there are a variety of command and options, but the simplest one you can run […]

  6. Converting Office 365 Users From Federated to StandardOffice 365 for Business - February 7, 2013

    […] and sign in as you normally would – for information on how to get started with powershell, see this article. Then run the command: Convert-MsolFederatedUser -userprincipalname user@domain.com Where […]

  7. Change a Mailbox Type in Office 365 - Office 365 for BusinessOffice 365 for Business - February 15, 2013

    […] […]

Leave a Reply

* Copy This Password *

* Type Or Paste Password Here *