{"id":454,"date":"2023-03-08T11:04:48","date_gmt":"2023-03-08T10:04:48","guid":{"rendered":"https:\/\/schoppe.it\/wiki\/?p=454"},"modified":"2024-09-03T08:50:58","modified_gmt":"2024-09-03T06:50:58","slug":"e-mails-finden-und-loeschen-mit-search-mailbox-und-deletecontent","status":"publish","type":"post","link":"https:\/\/schoppe.it\/wiki\/e-mails-finden-und-loeschen-mit-search-mailbox-und-deletecontent\/","title":{"rendered":"E-Mails finden und l\u00f6schen mit Search-Mailbox und DeleteContent"},"content":{"rendered":"\n<p>Mit dem Exchange Befehl &#8222;Search-Mailbox&#8220; k\u00f6nnen alle Postf\u00e4cher anhand einer SearchQuery durchsucht werden. Auf diese Weise k\u00f6nnen bspw. Phishing-E-Mails gefunden und organisationsweit gel\u00f6scht werden.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SearchQuery erstellen<\/h2>\n\n\n\n<p>Die verf\u00fcgbaren Filterkriterien und Vergleichsoperatoren findet Ihr auf der folgenden Webseite:<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/learn.microsoft.com\/en-us\/exchange\/security-and-compliance\/in-place-ediscovery\/message-properties-and-search-operators\" target=\"_blank\">https:\/\/learn.microsoft.com\/en-us\/exchange\/security-and-compliance\/in-place-ediscovery\/message-properties-and-search-operators<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"32\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox2-1024x32.png\" alt=\"\" class=\"wp-image-456\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox2-1024x32.png 1024w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox2-300x9.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox2-768x24.png 768w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox2.png 1138w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Die folgende beispielhafte SearchQuery ermittelt alle E-Mails von <strong>andre@schoppe.it<\/strong>, <strong>datenschutz@schoppe.it<\/strong> oder der Domain <strong>webhost1ng.de<\/strong>. Es werden nur E-Mails ber\u00fccksichtigt, die nach dem <strong>15.01.2023 01:00:00<\/strong> eingegangen sind.<\/p>\n\n\n\n<p>Die Zeitangabe ist immer die UTC-Zeit plus\/minus Ortszeit. F\u00fcr Deutschland\/Berlin gilt +1 Stunde.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$searchquery = &quot;(from:andre@schoppe.it OR from:datenschutz@schoppe.it OR from:webhost1ng.de) AND received&gt;=01\/15\/23&quot;\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"14\" src=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox3-1024x14.png\" alt=\"\" class=\"wp-image-457\" srcset=\"https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox3-1024x14.png 1024w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox3-300x4.png 300w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox3-768x11.png 768w, https:\/\/schoppe.it\/wiki\/wp-content\/uploads\/sites\/2\/2023\/03\/SearchMailbox3.png 1384w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Bei folgendem Beispiel ermittelt die SearchQuery alle E-Mail anhand des Betreffs.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$searchquery = &quot;(subject:&#039;RE: IT-Service-Helpdesk&#039; OR subject:&#039;RE: ALLE Mitarbeiter Anwendung&#039;) AND received&gt;=01\/15\/23&quot;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Suche ausf\u00fchren mit Log<\/h2>\n\n\n\n<p>Der folgende Befehl durchsucht alle Mailboxen mit der zuvor festgelegten SearchQuery und speichert das Suchergebnis in den Ordner Suchergebnisse des Postfachs targetmailbox@schoppe.it. <\/p>\n\n\n\n<p>Der Ordner wird automatisch erstellt, sollte er noch nicht existieren. <\/p>\n\n\n\n<p>Wichtig: Die TargetMailbox wird bei der Suchabfrage nicht ber\u00fccksichtigt.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nget-mailbox | search-mailbox -SearchQuery $searchquery -LogOnly -LogLevel FULL -TargetMailbox targetmailbox@schoppe.it -TargetFolder Suchergebnisse\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">E-Mails l\u00f6schen<\/h2>\n\n\n\n<p>Der folgende Befehl l\u00f6scht alle E-Mails, die mit der zuvor festgelegten SearchQuery ermittelt werden.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nGet-Mailbox | Search-Mailbox -SearchQuery $searchquery -DeleteContent\n<\/pre><\/div>\n\n\n<p>Wenn der Parameter -DeleteContent erg\u00e4nzt wird mit den Paramatern -TargetMailbox und -TargetFolder wird eine Kopie der gel\u00f6schten E-Mails in der TargetMailbox erstellt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Weitere Informationen<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Search-Mailbox<\/h3>\n\n\n\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/exchange\/search-mailbox?view=exchange-ps\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/exchange\/search-mailbox?view=exchange-ps<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Message properties and search operators for In-Place eDiscovery in Exchange Online<\/h3>\n\n\n\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/exchange\/security-and-compliance\/in-place-ediscovery\/message-properties-and-search-operators\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/learn.microsoft.com\/en-us\/exchange\/security-and-compliance\/in-place-ediscovery\/message-properties-and-search-operators<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mit dem Exchange Befehl &#8222;Search-Mailbox&#8220; k\u00f6nnen alle Postf\u00e4cher anhand einer SearchQuery durchsucht werden. Auf diese Weise k\u00f6nnen bspw. Phishing-E-Mails gefunden und organisationsweit gel\u00f6scht werden.<\/p>\n","protected":false},"author":1,"featured_media":456,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,12],"tags":[],"powershell":[],"wordpress":[],"exchange":[74,172],"linux":[],"class_list":["post-454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein","category-microsoft-exchange-server","exchange-get-mailbox","exchange-search-mailbox","entry"],"_links":{"self":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/comments?post=454"}],"version-history":[{"count":7,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/454\/revisions"}],"predecessor-version":[{"id":542,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/posts\/454\/revisions\/542"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/media\/456"}],"wp:attachment":[{"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/media?parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/categories?post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/tags?post=454"},{"taxonomy":"powershell","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/powershell?post=454"},{"taxonomy":"wordpress","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/wordpress?post=454"},{"taxonomy":"exchange","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/exchange?post=454"},{"taxonomy":"linux","embeddable":true,"href":"https:\/\/schoppe.it\/wiki\/wp-json\/wp\/v2\/linux?post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}