1. On your local computer, open Windows PowerShell with elevated permission (Run as administrator) and run the following command.
$UserCredential = Get-Credential
In the Windows PowerShell Credential Request dialog box, type your Exchange Online user name and password, and then click OK.
2. Then run the following command.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
3. Next, run the following command.
Set-ExecutionPolicy RemoteSigned
Select YES
4. Run the next command.
Import-PSSession $Session
To disconnect your session, run
Remove-PSSession $Session
0 comments:
Post a Comment