对所有用户禁用自动映射

时间:2018-11-16 15:15:58

标签: powershell office365

我目前正在尝试为所有用户禁用自动映射,我已经设置了Powershell并连接到我的o365实例-我尝试操作以下内容:

11-27 00:01:34.151 3152-3346/com.androidapps.user.weatherapp D/IOException: http://api.openweathermap.org/data/2.5/weather?q=Berlina&units=metric&appid=d32068a850405b593a87d410fcc50a4f
11-27 00:01:34.151 3152-3346/com.androidapps.user.weatherapp W/System.err: java.io.FileNotFoundException: http://api.openweathermap.org/data/2.5/weather?q=Berlina&units=metric&appid=d32068a850405b593a87d410fcc50a4f
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:206)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at java.net.URL.openStream(URL.java:470)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at com.androidapps.user.weatherapp.MainActivity$GetJSONOpenWeather.doInBackground(MainActivity.java:219)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at com.androidapps.user.weatherapp.MainActivity$GetJSONOpenWeather.doInBackground(MainActivity.java:204)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:292)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
11-27 00:01:34.152 3152-3346/com.androidapps.user.weatherapp W/System.err:     at java.lang.Thread.run(Thread.java:818)
11-27 00:01:34.192 3152-3180/com.androidapps.user.weatherapp D/EGL_emulation: eglMakeCurrent: 0xb42b9b20: ver 2 0
11-27 00:01:34.227 3152-3152/com.androidapps.user.weatherapp D/JSONObjetc: End of input at character 0 of 

我的主要问题是,似乎可以使用以下代码在每个用户的基础上运行此功能,但是我如何设法使它针对所有用户运行?

$FixAutoMapping = Get-MailboxPermission -Identity sharedmailbox | where {$_.AccessRights -eq "FullAccess" -and $_.IsInherited -eq $false}
$FixAutoMapping | Remove-MailboxPermission
$FixAutoMapping | ForEach {Add-MailboxPermission -Identity $iden -User $_.User -AccessRights:FullAccess -AutoMapping $false}

0 个答案:

没有答案