[Quick Links] |
Search Site

Site Details

rendered in 0.0410 secs

Captain's Log | Friday 24th of June 2016

connect to powershell on office 365
make sure you have these installed:
1, 2, 3, 4
Set-ExecutionPolicy Unrestricted
then in explorer create a new file to setup your environment: C:\111\powershell_env\setup_env.ps1
Import-Module MSOnline
$O365Cred = Get-Credential
$O365Session = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection
Import-PSSession $O365Session
Connect-MsolService –Credential $O365Cred

Open the "Windows Azure Active Directory Module for Windows PowerShell" tool and cd into the folder. Now to setup our connection to o365, type:
Type in your credentials, wait for about 30 seconds whilst the environment is configured and then you're good to go. You can run exchange powershell commands as if you were on the local server.