{"id":765,"date":"2018-05-04T11:05:48","date_gmt":"2018-05-04T10:05:48","guid":{"rendered":"http:\/\/www.vatland.no\/?p=765"},"modified":"2018-05-04T19:35:58","modified_gmt":"2018-05-04T18:35:58","slug":"list-exchange-mailboxes-with-forwarding-rules","status":"publish","type":"post","link":"https:\/\/www.vatland.no\/index.php\/list-exchange-mailboxes-with-forwarding-rules\/","title":{"rendered":"List Exchange mailboxes with forwarding rules"},"content":{"rendered":"<p>Simple list of all mailboxes and rules. Displays more info if one of them contains a forwarding rule:<\/p>\n<div>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">$mb=Get-Mailbox | Sort-Object -Property displayname\r\n$t2=0;$t=($mb).count;$mb| ForEach-Object {write-host $t2&quot;\\&quot;$t &quot; &quot; $_.displayname;$t2++;get-inboxrule -mailbox $_.alias| ForEach-Object {if($_.description -like &quot;*forward*&quot;){write-host $_.description -foregroundcolor red}}}<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Simple list of all mailboxes and rules. Displays more info if one of them contains a forwarding rule: $mb=Get-Mailbox | Sort-Object -Property displayname $t2=0;$t=($mb).count;$mb| ForEach-Object {write-host $t2&quot;\\&quot;$t &quot; &quot; $_.displayname;$t2++;get-inboxrule -mailbox $_.alias| ForEach-Object {if($_.description -like &quot;*forward*&quot;){write-host $_.description -foregroundcolor red}}}<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"List Exchange mailboxes with forwarding rules","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,52,48],"tags":[],"class_list":["post-765","post","type-post","status-publish","format-standard","hentry","category-exchange","category-office365","category-powershell"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"jetpack-related-posts":[{"id":367,"url":"https:\/\/www.vatland.no\/index.php\/exchange-server-quarantined-a-mailbox\/","url_meta":{"origin":765,"position":0},"title":"Exchange server quarantined a mailbox.","author":"Atle","date":"November 11, 2014","format":false,"excerpt":"One user tried to run an attachment in a newly received email \u00a0. After this his mailbox became inaccessible. When he tried to access it\u00a0using OWA the familiar message appeared\u00a0: Something went wrong. My first thought was that the database was dismounted, but other mailboxes on the same database still\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"exchange","src":"https:\/\/i0.wp.com\/www.vatland.no\/wp-content\/uploads\/2014\/09\/exchange.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":957,"url":"https:\/\/www.vatland.no\/index.php\/hash-tables-in-powershell\/","url_meta":{"origin":765,"position":1},"title":"Hash tables in powershell","author":"Atle","date":"March 23, 2020","format":false,"excerpt":"We all have the need to store data in some kind of arrays. I use hashtables a lot. Preferred use is as a lookup table, I can use 'contains' instead of looping through each item or reference an object by name instead of index number. Lookup table for licenses is\u2026","rel":"","context":"In &quot;CSP&quot;","block_context":{"text":"CSP","link":"https:\/\/www.vatland.no\/index.php\/category\/csp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":975,"url":"https:\/\/www.vatland.no\/index.php\/log-tenants-from-office-365-to-local-db\/","url_meta":{"origin":765,"position":2},"title":"Log tenants from office 365 to local Db","author":"Atle","date":"January 3, 2021","format":false,"excerpt":"Hi, I like to keep control of how many licenses our cutomers use versus how many\u00a0 have been purchased. Here is 1st part\u00a0 my PS script to copy the info from csp to the DB. I will start creating a database and table to keep a list of all the\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/www.vatland.no\/index.php\/category\/azure\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":950,"url":"https:\/\/www.vatland.no\/index.php\/secretservertycotic-plugin-for-powershell-secretsmanagement-module\/","url_meta":{"origin":765,"position":3},"title":"SecretServer(Thycotic) plugin for powershell SecretsManagement module.","author":"Atle","date":"February 18, 2020","format":false,"excerpt":"With the new powershell module SecretsManagement it is possible to add plugins. The new module is used to get\/add\/remove credentials. I created a plugin for secretserver to this module. To get started you will have to install secretsmanagement: Install-Module -Name Microsoft.Powershell.SecretsManagement -AllowPrerelease If -AllowPrerelase is not an option you would\u2026","rel":"","context":"In &quot;Powershell&quot;","block_context":{"text":"Powershell","link":"https:\/\/www.vatland.no\/index.php\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":51,"url":"https:\/\/www.vatland.no\/index.php\/permanently-delete-disconnected-mailboxes-in-exchange-2010\/","url_meta":{"origin":765,"position":4},"title":"Permanently delete disconnected mailboxes in Exchange 2010","author":"Atle","date":"February 14, 2013","format":false,"excerpt":"This could be usefull when moving users and you would like to free up some space. # Permanently delete disconnected mailboxes. List disconnected:Get-MailboxStatistics -Server\u00a0MAILSERVER | ?{$_.DisconnectDate -ne $null} |ft Displayname,Identity,Disconnectreason Remove by using mailbox database and mailbox identity.remove-storemailbox -Database\u00a0MAILBOXDATABASE -Identity \"8be4d91d-6380-4dcd-b5a4-d003f4ec3f14\" -MailboxState Disabled","rel":"","context":"In &quot;Exchange&quot;","block_context":{"text":"Exchange","link":"https:\/\/www.vatland.no\/index.php\/category\/exchange\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":667,"url":"https:\/\/www.vatland.no\/index.php\/forwarding-email-in-exchange\/","url_meta":{"origin":765,"position":5},"title":"Forwarding email in Exchange","author":"Atle","date":"April 5, 2016","format":false,"excerpt":"One common question from users are \"How can I forward my email to my home mail?\" or from a manager \"How can we forward his\/her mail to the external address?\". In fact in Exchange there is several possibilities, but most of them requires some administrator involvement. For users to forward\u2026","rel":"","context":"In &quot;Exchange&quot;","block_context":{"text":"Exchange","link":"https:\/\/www.vatland.no\/index.php\/category\/exchange\/"},"img":{"alt_text":"forward_emc1","src":"https:\/\/i0.wp.com\/www.vatland.no\/wp-content\/uploads\/2016\/04\/forward_emc1-300x182.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/posts\/765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/comments?post=765"}],"version-history":[{"count":6,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/posts\/765\/revisions"}],"predecessor-version":[{"id":773,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/posts\/765\/revisions\/773"}],"wp:attachment":[{"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/media?parent=765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/categories?post=765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vatland.no\/index.php\/wp-json\/wp\/v2\/tags?post=765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}