予定表の公開設定を変えたら全社にメールが。。。
Outlookの予定表を共有する場合、共有された人には共有されたことを示す通知メールが送られる。
顔見知りのチーム内なら良いが、設定によっては全社一斉メールで送られることもある迷惑仕様である。
解決策として、PowerShellを使えば通知メールを送らずに共有設定を変更することができるようなので、ここに記載する。
準備
1. PowerShellを起動 (ユーザー権限でOK)
2. 以下を入力し、自分のユーザーにモジュールをインストールする
Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser
3. 以下を入力し、モジュールを呼び出す
Import-Module ExchangeOnlineManagement
うまくいかない場合、以下を実行するとうまくいく場合がある。
(PowerShellの実行ポリシーを変更してから手順3を実行している)
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
Import-Module ExchangeOnlineManagement
4. 以下を実行後、ユーザー選択画面が立ち上がるので、自分のアカウントを選択する
Connect-ExchangeOnline
うまくいかない場合、以下の手順が有効な場合がある
1行目のあとにダイアログボックスが立ち上がるので、メールアドレスとパスワードを入力する。
$lc = Get-Credential
Connect-ExchangeOnline -Credential $lc
5. 以下を入力することで、既存の予定表の公開設定が出力される
ただし、my_address@my_corp.com
は自身のメールアドレスに置き換えること
Get-MailboxFolderPermission -Identity "my_address@my_corp.com:\予定表"
うまくいかない場合は、予定表
を Calendar
に変更すると実施できる可能性がある
設定
引続きPowerShellに対して以下のコマンドを入力することで、通知を送らずに各種公開範囲の変更が可能
自分の予定表を組織(=Default)に対して箱だけ表示可能にする場合
Set-MailboxFolderPermission -Identity "my_address@my_corp.com:\予定表" -User "Default" -AccessRights "AvailabilityOnly"
自分の予定表を他人に対して、件名と中身を表示可能にする場合(新規に)
Add-MailboxFolderPermission -Identity "my_address@my_corp.com:\予定表" -User "partner_address@my_corp.com" -AccessRights "Reviewer"
既に追加済のアカウントに対して公開範囲を変更する場合は、
Add-MailboxFolderPermission
をSet-MailboxFolderPermission
に変更することで可能
自分の予定表の公開設定を削除する場合
Remove-MailboxFolderPermission -Identity "my_address@my_corp.com:\予定表" -User "partner_address@my_corp.com"
ただし、公開設定の削除だけであればOutlookのGUIから操作しても通知メールは発生しなかった。
参考
-
outlook 365にて、予定表の共有をしたいが、メール配信したくない
https://answers.microsoft.com/ja-jp/outlook_com/forum/all/outlook/00814e01-1e4f-4ed7-b76c-ec4398796179 -
Exchange Online PowerShell に接続する
https://learn.microsoft.com/ja-jp/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps -
Cannot get PowerShell script to run
https://answers.microsoft.com/en-us/windows/forum/all/cannot-get-powershell-script-to-run/900edc39-35e8-4896-92d0-05aad75eac87 -
Credentialの取得方法
https://www.limilabs.com/qa/4595/connect-exchangeonline-for-exchange-in-hybrid-mode -
各コマンドの詳細
- Get-MailboxFolderPermission
https://learn.microsoft.com/en-us/powershell/module/exchange/get-mailboxfolderpermission?view=exchange-ps - Set-MailboxFolderPermission
https://learn.microsoft.com/en-us/powershell/module/exchange/set-mailboxfolderpermission?view=exchange-ps - Add-MailboxFolderPermission
https://learn.microsoft.com/ja-jp/powershell/module/exchange/add-mailboxfolderpermission?view=exchange-ps - Remove-MailboxFolderPermission
https://learn.microsoft.com/en-us/powershell/module/exchange/remove-mailboxfolderpermission?view=exchange-ps
- Get-MailboxFolderPermission