{"id":77131,"date":"2016-02-14T11:59:07","date_gmt":"2016-02-14T11:59:07","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/?p=77131"},"modified":"2019-02-18T09:19:53","modified_gmt":"2019-02-18T16:19:53","slug":"powertip-add-exclusion-folder-to-windows-defender-using-powershell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-add-exclusion-folder-to-windows-defender-using-powershell\/","title":{"rendered":"PowerTip: Use PowerShell to add exclusion folder to Windows Defender"},"content":{"rendered":"<p><strong>Summary<\/strong>: Use Windows PowerShell to add an exclusion folder to Windows Defender.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>\u00a0How can I add the C:\\temp folder to the exclusion list so it is not scanned by Windows Defender?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>\u00a0Use the <strong>Add-MpPreference<\/strong> cmdlet and specify the exclusion path, for example:<\/p>\n<p style=\"padding-left: 120px\">Add-MpPreference -ExclusionPath &#8220;C:\\Temp&#8221;<\/p>\n<p style=\"padding-left: 60px\"><strong>Note\u00a0 <\/strong>You must run Windows PowerShell with elevated permissions when you execute this command or an error arises.<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\" alt=\" \" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Use Windows PowerShell to add an exclusion folder to Windows Defender. \u00a0How can I add the C:\\temp folder to the exclusion list so it is not scanned by Windows Defender? \u00a0Use the Add-MpPreference cmdlet and specify the exclusion path, for example: Add-MpPreference -ExclusionPath &#8220;C:\\Temp&#8221; Note\u00a0 You must run Windows PowerShell with elevated permissions when [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[639],"tags":[356,3,63,45],"class_list":["post-77131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powertip","tag-powertip","tag-scripting-guy","tag-security","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Use Windows PowerShell to add an exclusion folder to Windows Defender. \u00a0How can I add the C:\\temp folder to the exclusion list so it is not scanned by Windows Defender? \u00a0Use the Add-MpPreference cmdlet and specify the exclusion path, for example: Add-MpPreference -ExclusionPath &#8220;C:\\Temp&#8221; Note\u00a0 You must run Windows PowerShell with elevated permissions when [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/77131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=77131"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/77131\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=77131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=77131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=77131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}