poramboku
asked on
query all mailbox rules
I want to search all users on my tenant and then search any one has a forwarding rule that is sending/forwarding emails to a particular user
Eg:
if that is for a single mail box:
Get-InboxRule -Mailbox sales@mycompany.com -> this will list all rules for a particular mail box.
Get-InboxRule -Mailbox sales@mycompany.com -Identity "rule1" | select -ExpandProperty Description -> this would give me the description..
if this is for a single mail box, I can work manually,
problem/need some direction for:
but I need to search all mail boxes and then find any rules on that mail box with a description "forward the message to"
not sure how do I accomplish this.. - can some one give me some direction..
Eg:
if that is for a single mail box:
Get-InboxRule -Mailbox sales@mycompany.com -> this will list all rules for a particular mail box.
Get-InboxRule -Mailbox sales@mycompany.com -Identity "rule1" | select -ExpandProperty Description -> this would give me the description..
if this is for a single mail box, I can work manually,
problem/need some direction for:
but I need to search all mail boxes and then find any rules on that mail box with a description "forward the message to"
not sure how do I accomplish this.. - can some one give me some direction..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The example I posted above does just that. Maybe try running it?
ASKER
sure if that works, it would be a good one for me.
but, I am a bit confused of % and ? mark symbols on the above script..
I will test @ my end -- thx a bunch..
but, I am a bit confused of % and ? mark symbols on the above script..
I will test @ my end -- thx a bunch..
% is a short-hand notation (or alias) for Foreach-Object.