Exchange-SetMSOLServicePrincipal
$x= Get-MsolServicePrincipal -AppPrincipalId 00000002-0000-0ff1-ce00-000000000000 $x.ServicePrincipalnames.Add("https://exchange.schweigerstechblog.de/") $x.ServicePrincipalnames.Add("https://autodiscover.schweigerstechblog.de/") Set-MSOLServicePrincipal -AppPrincipalId 00000002-0000-0ff1-ce00-000000000000 -ServicePrincipalNames $x.ServicePrincipalNames