{"id":17,"date":"2021-07-10T07:23:05","date_gmt":"2021-07-10T07:23:05","guid":{"rendered":"https:\/\/w365.dk\/?p=17"},"modified":"2021-07-29T18:51:26","modified_gmt":"2021-07-29T17:51:26","slug":"dkim","status":"publish","type":"post","link":"https:\/\/w365.dk\/index.php\/2021\/07\/10\/dkim\/","title":{"rendered":"Enable DKIM by PowerShell in Exchange Online"},"content":{"rendered":"<h2>Enable DKIM by PowerShell in Exchange Online<\/h2>\n<h5>Prerequisites: Admin acess to the O365 tenant and access to DNS for your Domain<\/h5>\n<h5><em>Replace the red highlighted text in the guide, with your domain.<\/em><\/h5>\n<p>&nbsp;<\/p>\n<p><span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"da\" data-phrase-index=\"0\">You can get an overview of your DKIM status on your domains at;<\/span><\/span> <span style=\"color: #333399;\"><a style=\"color: #333399;\" href=\"https:\/\/protection.office.com\/dkimv2\" data-cke-saved-href=\"https:\/\/protection.office.com\/dkimv2\">https:\/\/protection.office.com\/dkimv2<\/a><\/span><\/p>\n<p><a href=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-19\" src=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/2-300x59.png\" alt=\"\" width=\"699\" height=\"138\" srcset=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/2-300x59.png 300w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/2-1024x202.png 1024w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/2-768x152.png 768w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/2-1536x303.png 1536w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/2-500x99.png 500w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/2.png 1921w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><em>Here we see DKIM are not enabled at the moment on the domain w365.dk<\/em><\/p>\n<p><span style=\"color: #333399;\"><a style=\"color: #333399;\" href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/exchange\/connect-to-exchange-online-powershell\">Connect to Exchange Online PowerShell<\/a><\/span><\/p>\n<pre>Type the command: <strong>New-DkimSigningConfig -DomainName <b><span style=\"color: #ff0000;\">w365.dk<\/span><\/b> -Enabled $false<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-18\" src=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/1-1024x136.png\" alt=\"\" width=\"700\" height=\"93\" srcset=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/1-1024x136.png 1024w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/1-300x40.png 300w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/1-768x102.png 768w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/1-500x66.png 500w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/1.png 1212w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><em><span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"da\" data-phrase-index=\"0\">Because I have previously set up DKIM, we get an error here, you will not get this error<\/span><\/span><\/em><\/p>\n<p>Now it&#8217;s time to get our DKIM records<\/p>\n<pre>Type the command: <b>Get-DkimSigningConfig -Identity <span style=\"color: #ff0000;\">w365.dk<\/span><\/b><b>\u00a0| fl Selector1CNAME, Selector2CNAME<\/b><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-20\" src=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/3-300x32.png\" alt=\"\" width=\"700\" height=\"74\" srcset=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/3-300x32.png 300w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/3-768x81.png 768w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/3-1000x107.png 1000w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/3-500x53.png 500w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/3.png 1018w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p><em>Now we got our 2 DKIM Records;<\/em><\/p>\n<h4>Selector 1 record:<\/h4>\n<ul>\n<li>Host name: <strong>selector1._domainkey.<span style=\"color: #ff0000;\">w365.dk<\/span><\/strong><\/li>\n<li>Points to address or value:<strong> selector1-<span style=\"color: #ff0000;\">w365-dk<\/span>._domainkey.<span style=\"color: #ff0000;\">kbhw365dk<\/span>.onmicrosoft.com<\/strong><\/li>\n<li>TTL: <strong>3600<\/strong><\/li>\n<\/ul>\n<h4>Selector 2 record:<\/h4>\n<ul>\n<li>Host name: <strong>selector2._domainkey.<span style=\"color: #ff0000;\">w365.dk<\/span><\/strong><\/li>\n<li>Points to address or value:<strong> selector2-<span style=\"color: #ff0000;\">w365-dk<\/span>._domainkey.<span style=\"color: #ff0000;\">kbhw365dk<\/span>.onmicrosoft.com<\/strong><\/li>\n<li>TTL: <strong>3600<\/strong><\/li>\n<\/ul>\n<p>Login to your DNS hosting service and create the two CNAME records<\/p>\n<p><a href=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-37\" src=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/4-300x103.png\" alt=\"\" width=\"699\" height=\"240\" srcset=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/4-300x103.png 300w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/4-1024x352.png 1024w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/4-768x264.png 768w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/4.png 1086w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre>Then Enable DKIM signing: <strong>Set-DkimSigningConfig -Identity\u00a0<\/strong><span style=\"color: #ff0000;\"><b><span class=\"highlightColorYellow\">w365.dk<\/span><\/b><\/span><strong> -Enabled $true<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-40\" src=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/5-300x23.png\" alt=\"\" width=\"700\" height=\"54\" srcset=\"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/5-300x23.png 300w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/5-768x60.png 768w, https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/5.png 851w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>You are done, if you get an error, try wait 10min, and then try the last command again<\/p>\n<p><strong>Official Microsoft documentation;<\/strong> <span style=\"color: #000080;\"><a style=\"color: #000080;\" href=\"https:\/\/docs.microsoft.com\/en-us\/microsoft-365\/security\/office-365-security\/use-dkim-to-validate-outbound-email?view=o365-worldwide\">How to use DKIM for email in your custom domain &#8211; Office 365 | Microsoft Docs<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enable DKIM by PowerShell in Exchange Online Prerequisites: Admin acess to the O365 tenant and access to DNS for your Domain Replace the red highlighted text in the guide, with your domain. &nbsp; You can get an overview of your DKIM status on your domains at; https:\/\/protection.office.com\/dkimv2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Here we see &#8230;<\/p>\n","protected":false},"author":1,"featured_media":58,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,21],"tags":[3,28,29,6,5,4],"class_list":["post-17","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exchange-online","category-powershell","tag-dkim","tag-exchange-online","tag-m365","tag-o365","tag-office365","tag-powershell"],"jetpack_featured_media_url":"https:\/\/w365.dk\/wp-content\/uploads\/2021\/07\/what-is-DKIM-domainkeysidentifiedmail-1.png","_links":{"self":[{"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":31,"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/posts\/17\/revisions\/222"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/media\/58"}],"wp:attachment":[{"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w365.dk\/index.php\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}