Om verbinding te maken met Exchange online via PowerShell kan je de volgende commando’s gebruiken.
LET OP! ALS JE MFA GEBRUIKT SCROLL NAAR BENEDEN!
Open PowerShell als ADMINISTRATOR
Set-ExecutionPolicy RemoteSigned
$Credential=Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Credential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Zorg dat je de nieuwe v2 module hebt: open powershel als adminInstall-Module PowershellGet -Force
Update-Module PowershellGet
Set-ExecutionPolicy RemoteSigned
Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement Connect-ExchangeOnline
Voor MFA gebruik dit commando:
Open PowerShell als ADMINISTRATOR
Connect-EXOPSSession -UserPrincipalName Admin@adres