{"id":1479,"date":"2017-02-09T18:52:16","date_gmt":"2017-02-10T01:52:16","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=1479"},"modified":"2017-02-09T18:52:16","modified_gmt":"2017-02-10T01:52:16","slug":"basic-exchange-rule-management-via-exchange-management-shell","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=1479","title":{"rendered":"Basic Exchange Rule Management via Exchange Management Shell"},"content":{"rendered":"<p>New-InboxRule in EMS has many options.  I have just listed a very simple example here.  Get-Help New-InboxRule is your friend.<br \/>\nThis will set a rule to delete any email sent to this mailbox:<\/p>\n<blockquote><p>New-InboxRule -Mailbox <em>mailbox<\/em> -Name &#8220;<em>rulename<\/em>&#8221; -Delete $true<\/p><\/blockquote>\n<p>Get-Contant by itself will list all contacts.  If you pass Get-Contact a contact name, it will only return that contact:<\/p>\n<blockquote><p>Get-Contact &#8220;<em>contactname<\/em>&#8221; <\/p><\/blockquote>\n<p>To list a particular rule for a particular mailbox:<\/p>\n<blockquote><p>Get-InboxRule -Mailbox <em>mailbox<\/em> -Identity &#8220;<em>rulename<\/em>&#8220;<\/p><\/blockquote>\n<p>To disable a rule for a mailbox:<\/p>\n<blockquote><p>Disable-InboxRule -Mailbox <em>mailbox<\/em> -Identity &#8220;<em>rulename<\/em>&#8220;<\/p><\/blockquote>\n<p>To enable a rule for a mailbox:<\/p>\n<blockquote><p>Enable-InboxRule -Mailbox <em>mailbox<\/em> -Identity &#8220;<em>rulename<\/em>&#8220;<\/p><\/blockquote>\n<p>To get list of your command history.  This is dependent on the $MaximumHistoryCount variable.  I think the default is 32.<\/p>\n<blockquote><p>Get-History<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>New-InboxRule in EMS has many options. I have just listed a very simple example here. Get-Help New-InboxRule is your friend. This will set a rule to delete any email sent to this mailbox: New-InboxRule -Mailbox mailbox -Name &#8220;rulename&#8221; -Delete $true Get-Contant by itself will list all contacts. If you pass Get-Contact a contact name, it [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[358,125,439],"class_list":["post-1479","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-ems","tag-exchange","tag-rule"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1479"}],"version-history":[{"count":1,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1479\/revisions"}],"predecessor-version":[{"id":1480,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1479\/revisions\/1480"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}