Connect to Exchange online powershell
Connect to Exchange Online powershell
- Run Powershell as administrator
- Copy paste the below commands and enter credentials when prompted
$cloudcred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cloudCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
- Alternatively you can save above commands in a file as .ps1 and execute it on the powershell window
use can connect to Azure Active directory and Exchange online by running the following commands (by just add two line to the above one)
import-module msonline
$cloudcred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cloudCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Connect-MsolService -Credential $cloudcred
The newer module of AzureAD is available and can be connected through the below
Connect-AzureAD -Credential $cloudcred
The newer module of AzureAD is available and can be connected through the below
Connect-AzureAD -Credential $cloudcred
Comments
Post a Comment
Please add comments and feedback