Comments on: Using Filters with the Get-ExoMailbox Cmdlet https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/ Practical Office 365 News, Tips, and Tutorials Wed, 24 Jul 2024 14:27:31 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_297216'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_297216"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-297216 Wed, 24 Jul 2024 14:27:31 +0000 https://practical365.com/?p=52223#comment-297216 In reply to mt.

Get-ExoMailbox doesn’t support that filter. Get-Mailbox does:

Get-Mailbox -RecipientTypeDetails UserMailbox -Filter {ArchiveGuid -eq ‘00000000-0000-0000-0000-000000000000’}

]]>
By: mt https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-297215 Wed, 24 Jul 2024 14:12:54 +0000 https://practical365.com/?p=52223#comment-297215 I try to filter for two properties:
Get-EXOMailbox -ResultSize Unlimited -Filter “ArchiveGuid -Eq ‘00000000-0000-0000-0000-000000000000’ -And RecipientTypeDetails -Eq ‘UserMailbox'”
But that does not work. Anyone knows the right syntax for this?

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_288710'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_288710"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-288710 Wed, 28 Feb 2024 00:54:42 +0000 https://practical365.com/?p=52223#comment-288710 In reply to Admin.

If something doesn’t work in V3 that used to work, you should report it to Microsoft to make sure that the problem is brought to the attention of the engineering group and is fixed. It’s entirely possible that they made a decision to deprecate the count.

When I ran this command:
(Get-EXOMailbox -RecipientTypeDetails SharedMailbox -Properties ExchangeSecurityDescriptor).DiscretionaryAcl.Count

The returned value was 12… So something is happening.

]]>
By: Admin https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-288627 Tue, 27 Feb 2024 18:04:05 +0000 https://practical365.com/?p=52223#comment-288627 Hi , can you help me with EXOv3 version for (Get-EXOMailbox -RecipientTypeDetails SharedMailbox -Identity ‘test’ -Properties ExchangeSecurityDescriptor).DiscretionaryAcl.Count
after EXOv3 this started to give 0 response . With using Get-MailboxPermission and Get-RecipientPermission i need to iterate each mailbox which is time consuming. The above command was able to identify the users with delegates and which helped me to fetch delegates only for those the count was greater than 0.

]]>
By: Jahangir Shah https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-240836 Fri, 22 Jul 2022 16:29:03 +0000 https://practical365.com/?p=52223#comment-240836 In reply to Jahangir.

Got this fixed….

“ManagedBy -eq ‘$xyz'”

]]>
By: Jahangir https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-240832 Fri, 22 Jul 2022 14:33:19 +0000 https://practical365.com/?p=52223#comment-240832 I want to insert a vairiable in the below command, Can anyone help?
Get-Recipient -PropertySet ConsoleLargeSet -ResultSize ‘1000’ -SortBy DisplayName -RecipientType ‘DynamicDistributionGroup’,’MailNonUniversalGroup’,’MailUniversalDistributionGroup’,’MailUniversalSecurityGroup’ -Filter ‘((ManagedBy -eq ”CN=UserName,OU=Users,DC=sub,DC=Domain,DC=com”))’
”CN=UserName,OU=Users,DC=sub,DC=Domain,DC=com” – This needs to be replaced with a vairiable. For eg. $xyz.
I will pass CN of the user in $xyz.
Any Help appreciated.

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_240266'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_240266"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-240266 Fri, 08 Jul 2022 09:13:48 +0000 https://practical365.com/?p=52223#comment-240266 In reply to Dave.

Yep, it’s just one of those PowerShell things… It’s similar to the way that Graph comparisons insist on “true” rather than “True.”

]]>
By: Dave https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-240259 Fri, 08 Jul 2022 05:11:46 +0000 https://practical365.com/?p=52223#comment-240259 If anyone gets here like I did trying to extract data, the example Get-ExoMailbox -Filter {DisplayName -Like “*Tony*”}
throws a filter error like Tony mentioned, but Get-ExoMailbox -Filter {DisplayName -like “*Tony*”} returns results for me.
Just a small ‘l’ on the -like comparison operator

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_238538'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_238538"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-238538 Thu, 19 May 2022 08:57:01 +0000 https://practical365.com/?p=52223#comment-238538 In reply to Steve Hare.

Steve, I wrote this up to show how to get the count of unread messages from mailboxes:

Using the Graph API to Generate Mailbox Folder Statistics

A reader asked if it’s possible to use PowerShell to return the unread count for the Inbox folder in user mailboxes. The standard Exchange Online PowerShell cmdlets tell you a lot about mailbox folder statistics, but they can’t look inside a folder. But the Microsoft Graph APIs can, so a combination of PowerShell and the Graph deliver a solution to the problem.

https://office365itpros.com/2022/05/19/mailbox-folder-statistics/

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_238504'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_238504"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/using-filters-with-the-get-exomailbox-cmdlet/#comment-238504 Mon, 16 May 2022 18:38:01 +0000 https://practical365.com/?p=52223#comment-238504 In reply to Steve Hare.

The Exchange Online cmdlets have never delivered this kind of information (which is why EWS exists). If you want to access folder-level detail about item unread counts, you need to use a Graph query, like:

https://graph.microsoft.com/v1.0/users/{UserId}/mailFolders/Inbox/messages?$filter=isRead ne true&$count=true

Where UserId is the Azure AD identifier for the user’s account.

]]>