Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Need help with query inbox rules

$
0
0

Hi All,
I am trying to search and find all inbox rules in exchange and the script is working good if I don't have users with multiple mailboxes. If I have user test.test  and if he has 4 mailboxes the script will fail with the The specified mailbox "some name isn't unique.

I tried to pass ID, Name, Alias, Identity and all 4 giving the same result. Only thing that is left is to try with the GUID but then I run into this error. 

Cannot convert the value of type "System.Guid" to type "Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter".

Is there a way to solve this issue. The lines I run are

$mailboxes = get-mailbox –resultSize unlimited
$rules = $mailboxes | foreach { get-inboxRule –mailbox $_.alias}





Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>