LoginSignup
0
1

More than 3 years have passed since last update.

【Office365】共有メールボックスの一覧と権限の与えられているユーザーを抽出する

Posted at

全部の共有メールボックスの中から誰がどの共有メールボックスの権限を持っているのか知るのに有効なPowerShellです。
弊社ではよく必要になります(笑)

①まず、共有メールボックスのフルアクセス許可を持つメンバー情報を一括で出力します。

FullAccess.ps1
Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails SharedMailbox | Get-MailboxPermission | Where {($_.User -Notlike "*S-1-5-21*") -And ($_.User -Notlike "*\*")} | Select Identity,User,AccessRights | Export-CSV -NoTypeInformation -Encoding UTF8 -Path "C:\temp\SharedFullAccesslist.csv"

②上記、PowerShellでは、共有メールボックス名が取得出来ないので、以下のPowerShellを実行します。
Exchange管理センターからでも共有メールボックスの一覧情報は取得出来ます。

Mailbox.ps1
Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails SharedMailbox | Select DisplayName,PrimarySmtpAddress  | Export-CSV -NoTypeInformation -Encoding UTF8 -Path "C:\Temp\PrimarySmtpAddress.CSV"

あとはExcelでうまく結合をして一覧を作成してください。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1