Set-ExecutionPolicy RemoteSigned Set-ExecutionPolicy Unrestricted sudo apt-get update sudo apt-get install -y powershell Get-Module -ListAvailable Enter-PSSession -Hostname -Username -SSHTransport Invoke-Expression "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI" $user = Get-Credential $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $user -Authentication Basic -AllowRedirection Import-PSSession $session ext install powershell Get-Command *mailbox Help Help -Detailed Help -Examples Get-Mailbox thomas.joos@FIXME.int |fl DisplayName, Database, Alias, OrganizationalUnit Get-Mailbox | Format-Table DisplayName, Database Install-Module -Name AzureAD Install-Module MSOnline Get-Command *msol* Set-MsolDomain -Name contoso.onmicrosoft.com -IsDefault Remove-MsolDomain -DomainName contoso.com get-msoluser |ft UserPrincipalname, Displayname, *lic* get-msoluser -userprincipalname "" |select licenses, islicensed | fl set-msoluserlicense -userprincipalname "" -addlicenses ""