Open PowerShell as an administrator
Go to Start, search for PowerShell, right click Windows Powershell and Run as Administrator
Run this:
New-item
–type file –force
$profile
And this,
notepad
$profile
Copy the following PowerShell commands into the notepad and save it.
Function Connect-EXOnline{
$credentials = Get-Credential -Credential YOURACCOUNT@DOMAIN.COM
Write-Output "Getting the Exchange Online cmdlets"
$Session = New-PSSession -ConnectionUri https://outlook.office365.com/powershell-liveid/ `
-ConfigurationName Microsoft.Exchange -Credential $credentials `
-Authentication Basic -AllowRedirection
Import-PSSession $Session
}
Reopen the powershell and use the below command to connect to Exchange Online
Connect-ExOnline
No comments:
Post a Comment