-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSharedMailboxPermissions.ps1
More file actions
26 lines (22 loc) · 1.14 KB
/
SharedMailboxPermissions.ps1
File metadata and controls
26 lines (22 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$MlBxPrmsns = get-Mailbox -Filter {Name -like "some name"} | foreach{ Get-MailboxPermission $_.UserPrincipalName }
$MlBxPrmsnsArray = @()
$MlBxPrmsns | Foreach{
$access = $_.AccessRights.Split(",").Replace(" ","") | Sort
$box = New-Object PSObject
$box | Add-Member -MemberType NoteProperty -Name Identity -Value $null
$box | Add-Member -MemberType NoteProperty -Name User -Value $null
$box | Add-Member -MemberType NoteProperty -Name FullAccess -Value $null
$box | Add-Member -MemberType NoteProperty -Name DeleteItem -Value $null
$box | Add-Member -MemberType NoteProperty -Name ReadPermission -Value $null
$box | Add-Member -MemberType NoteProperty -Name ChangePermission -Value $null
$box | Add-Member -MemberType NoteProperty -Name ChangeOwner -Value $null
$box | Add-Member -MemberType NoteProperty -Name ExternalAccount -Value $null
$box | Add-Member -MemberType NoteProperty -Name SendAs -Value $null
$box.Identity = $_.Identity
$box.User = $_.User
foreach($item in $access){
$box.$Item = $true
}
$MlBxPrmsnsArray += $box
}
$MlBxPrmsnsArray | Export-Excel