1

Users in my organization complain about undelivered mail very often. 80% of times the reason are misconfigured rules on user's Outlook. Is there any way to closely examine Outlook rules on server side without loggin in to user's workstation with user's account? I found the command

Get-InboxRule -Mailbox $user | Select-Object MailboxOwnerID,Name,Description,Enabled,RedirectTo, MoveToFolder,ForwardTo | Export-CSV C:tempInboxRule.csv -NoTypeInformation

But it doesn't show full information about Outlook rule. I found Microsoft Docs But I do not see options such as MoveToFolder there.

Also I tried to grand myself Full permission on user's mailbox and log in via OWA and check the rules. But some rules are grayed out there and I can not check it's settings.

Also I tried to connect user's mailbox to my local Outlook, but rules seems not to sync.

My Exchange version is 2010.

Link
  • 25
  • 4
  • If you just type, `Get-InboxRule -Mailbox $user` don't you get a list of all rules for the user? Then `Get-InboxRule –Mailbox $user -Identity {IdentityNumber}` to get info for each rule. – Krackout Aug 10 '20 at 09:54
  • No, the result of `Get-InboxRule –Mailbox $user -Identity {IdentityNumber}` is very limited (1 line actually). It says that rule is enabled and says that priority is 1. No mo information! – Link Aug 10 '20 at 10:25
  • First command, `Get-InboxRule -Mailbox $user` results? – Krackout Aug 10 '20 at 10:27
  • Result of `Get-InboxRule -Mailbox $user` is list of rules with the following columns: Name, Enabled, Priority, RuleIdentity. Actually if I run second command `Get-InboxRule –Mailbox $user -Identity {IdentityNumber}` I get THE SAME, but only for 1 rule - the one that I written in `{IdentityNumber}` parameter. – Link Aug 10 '20 at 10:31
  • Try `Get-InboxRule –Mailbox $user -Identity {IdentityNumber} | fl` – Krackout Aug 10 '20 at 10:37
  • That was it! You can post it in answer section.What is this redirection to `fl`? Why doesn't it show full information from pure command? – Link Aug 10 '20 at 10:44
  • This does not really belong here, but `ft` is short for Format-Table, which outputs a **table** with one item per line. `fl` formats the output as a list of properties in which each property appears on a new line. – bjoster Aug 10 '20 at 15:55

2 Answers2

1

As Krackout said, you could use fl and foreach to output the details of all inbox rules. The following commands are for your reference:

$mailboxes = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize unlimited
foreach($mailbox in $mailboxes){Get-InboxRule -Mailbox $mailbox.Name | fl MailboxOwnerID,Name,Description,Enabled,RedirectTo, MoveToFolder,ForwardTo}
Ivan_Wang
  • 1,323
  • 1
  • 3
  • 4
0

As per discussed in comments, Get-InboxRule –Mailbox $user -Identity {IdentityNumber} | fl was able to give the expected result. fl stands for format list, you can also try ft format table. They apply to many powershell commands for formatting the result.

You can also use it inside a foreach loop to get all your users' rules.

I suppose it's a minimalistic approach, to not show full command result without extra parametres. It happens in many powershell commands.

Krackout
  • 1,559
  • 6
  • 17