Herstellen einer Verbindung ohne Proxy
$Cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection
import-PSSession $Session
Herstellen einer Verbindung mit Proxy
$Cred = Get-Credential
$proxysettings = New-PSSessionOption -ProxyAccessType IEConfig
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection -SessionOption $proxysettings
import-PSSession -AllowClobber $Session