wiki:connect_exchange_online_microsoft_powershell
This is an old revision of the document!
Table of Contents
Connect to Exchange Online with Microsoft Powershell
Installing Debian package did not work because of error
This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.
when running
Connect-ExchangeOnline -InlineCredential
Use docker instead:
docker run \ -v $HOME:$HOME \ -v $HOME/.local/share/powershell/:/root/.local/share/powershell/ \ -v $HOME/.cache/powershell/:/root/.cache/powershell/ \ -it mcr.microsoft.com/azure-powershell pwsh
Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement
$UserCredential = Get-Credential
Then input your credentials:
PS /> $UserCredential = Get-Credential PowerShell credential request Enter your credentials. User: user@example.com Password for user user@example.com: ****************
Connect to exchange:
Connect-ExchangeOnline -Credential $UserCredential
After it finished run
Get-Mailbox
to check if it is working.
Tested on
- Docker 19.03.8
- Ubuntu 20.04.
- Powershell 7.1.3.-1
See also
References
wiki/connect_exchange_online_microsoft_powershell.1617791033.txt.gz · Last modified: 2021/04/07 10:23 by antisa