Pagine

Exchange 201X- How get all users who have a forwarding email, redirect rule and delegate permission on them mailboxes or Outlook folders

How get all users who have a forwarding email enablex, redirect rules and permission delegation on their mailboxes or Outlook folders

Get-mailbox | select DisplayName,ForwardingAddress | where {$_.ForwardingAddress -ne $Null}

To find Forward Rules:

foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.ForwardTo} | fl MailboxOwnerID,Name,ForwardTo >> d:\Forward_Rule.txt }

To find Redirect Rules:

foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.ReDirectTo} | fl MailboxOwnerID,Name,RedirectTo >> d:\Redirect_Rule.txt }

Here's what I ended up using to find rules that wholesale forward or redirect...

foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.RedirectTo -or $_.ForwardTo -and -not ($_.description -match "If the message") } | fl MailboxOwnerId,Description >> rules.txt }

http://www.msexchange.org/kbase/ExchangeServerTips/ExchangeServer2010/ManagementAdministration/Getalluserswhohaveaforwardingaddressset.html

If you prefer to focalize on single user:


Get-InboxRule -Mailbox email@email.xxx | fl

Get-InboxRule -Mailbox email@email.xxx

Get-InboxRule -Mailbox email@email.xxx | fl MailboxOwnerID,Name,RedirectTo

If you want to view all users that delegated permission in outlook on them mailboxes on each single folder:

Get-Mailbox  –Identity 'email@email.xxx' | Get-MailboxFolder –Recurse -MailFolderOnly | Get-MailboxFolderPermission | Where-Object {$_.AccessRights –notlike “Owner” –or $_.AccessRights –notlike “None”} | Format-Table Identity, FolderName, User, AccessRights –AutoSize

Otherwise there this commands:


Get-MailboxFolderPermission –Identity 'email@email.xxx' | Fl