{"id":809292,"date":"2026-05-18T07:02:29","date_gmt":"2026-05-18T07:02:29","guid":{"rendered":"https:\/\/www.ninjaone.com\/?post_type=script_hub&#038;p=809292"},"modified":"2026-05-18T07:02:29","modified_gmt":"2026-05-18T07:02:29","slug":"enable-pua-protection-ms-defender-powershell","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/pt-br\/script-hub\/enable-pua-protection-ms-defender-powershell\/","title":{"rendered":"Como ativar a prote\u00e7\u00e3o contra PUA no MS Defender usando o PowerShell"},"content":{"rendered":"<p>No cen\u00e1rio <a href=\"https:\/\/www.ninjaone.com\/it-hub\/endpoint-security\/what-is-cybersecurity\/\">da seguran\u00e7a cibern\u00e9tica<\/a>, a evolu\u00e7\u00e3o cont\u00ednua das amea\u00e7as tornou as medidas proativas uma necessidade para qualquer organiza\u00e7\u00e3o. Uma dessas medidas \u00e9 a prote\u00e7\u00e3o PUA (Aplicativo Potencialmente Indesejado), um recurso do Microsoft Defender que ajuda a evitar instala\u00e7\u00f5es indesejadas de software. Ao garantir que os sistemas estejam protegidos contra essas poss\u00edveis amea\u00e7as, os profissionais de TI e os <a href=\"https:\/\/www.ninjaone.com\/what-is-an-msp\/\">MSPs (Managed Service Providers)<\/a> podem melhorar significativamente sua postura de seguran\u00e7a.<\/p>\n<h2>Hist\u00f3rico<\/h2>\n<p>A prote\u00e7\u00e3o PUA, como parte do Microsoft Defender, \u00e9 um recurso que detecta e bloqueia aplicativos que n\u00e3o s\u00e3o necessariamente mal-intencionados, mas que podem ser indesejados devido ao seu comportamento ou impacto em um sistema. A import\u00e2ncia desse roteiro n\u00e3o pode ser subestimada. Os profissionais de TI e os MSPs precisam de ferramentas para garantir a seguran\u00e7a de seus sistemas, e ativar a prote\u00e7\u00e3o contra PUA \u00e9 uma dessas ferramentas essenciais. Com um n\u00famero cada vez maior de softwares sendo distribu\u00eddos on-line, o risco de baixar e instalar inadvertidamente aplicativos indesejados \u00e9 maior do que nunca.<\/p>\n<h2>O roteiro<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">&lt;#\r\n.SYNOPSIS\r\n    Enables PUA protection in MS Defender\r\n.DESCRIPTION\r\n    Enables PUA protection in MS Defender\r\n.EXAMPLE\r\n    No parameters needed.\r\n    Enables PUA protection in MS Defender\r\n.OUTPUTS\r\n    None\r\n.NOTES\r\n    Minimum OS Architecture Supported: Windows 10, Windows Server 2016\r\n    Release Notes:\r\n    Initial Release\r\nBy using this script, you indicate your acceptance of the following legal terms as well as our Terms of Use at https:\/\/www.ninjaone.com\/terms-of-use.\r\n    Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms. \r\n    Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party. \r\n    Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library or website belonging to or under the control of any other software provider. \r\n    Warranty Disclaimer: The script is provided \u201cas is\u201d and \u201cas available\u201d, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations. \r\n    Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks. \r\n    Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script. \r\n    EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).\r\n#&gt;\r\n[CmdletBinding()]\r\nparam ()\r\n\r\nbegin {\r\n    function Test-IsElevated {\r\n        $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()\r\n        $p = New-Object System.Security.Principal.WindowsPrincipal($id)\r\n        $p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)\r\n    }\r\n}\r\nprocess {\r\n    if (-not (Test-IsElevated)) {\r\n        Write-Error -Message \"Access Denied. Please run with Administrator privileges.\"\r\n        exit 1\r\n    }\r\n    if ($(Get-Command -Name \"Set-MpPreference\").Name -like \"Set-MpPreference\") {\r\n        if ($(Get-MpPreference | Select-Object PUAProtection -ExpandProperty PUAProtection) -eq 0) {\r\n            try {\r\n                Set-MpPreference -PUAProtection Enabled -ErrorAction Stop\r\n            }\r\n            catch {\r\n                Write-Error $_\r\n                exit 1\r\n            }\r\n            Write-Host \"PUAProtection enabled.\"\r\n        }\r\n        else {\r\n            Write-Host \"PUAProtection already enabled.\"\r\n        }\r\n    }\r\n    else {\r\n        Write-Error \"The module ConfigDefender was not found. Is MS Defender installed?\"\r\n    }\r\n    exit 0\r\n}\r\nend {}<\/pre>\n<p>&nbsp;<\/p>\n\n<div class=\"in-context-cta\"><p>Acesse mais de 300 scripts no NinjaOne Dojo<\/p>\n<p><a href=\"https:\/\/www.ninjaone.com\/freetrialform\/\">Obter acesso<\/a><\/p>\n<\/div>\n<h2>Casos de uso em potencial<\/h2>\n<p>Imagine uma profissional de TI, Jane, em uma empresa de m\u00e9dio porte. Recentemente, a empresa enfrentou problemas com o download de software por parte dos funcion\u00e1rios que, embora n\u00e3o fosse abertamente mal-intencionado, afetou o desempenho do sistema e comprometeu potencialmente a privacidade dos dados. Jane pode implantar esse script em todos os sistemas da empresa, garantindo que a prote\u00e7\u00e3o PUA esteja ativada, reduzindo o risco de tais instala\u00e7\u00f5es no futuro.<\/p>\n<h2>Abordagem alternativa<\/h2>\n<p>A ativa\u00e7\u00e3o manual da prote\u00e7\u00e3o contra PUA envolve a navega\u00e7\u00e3o pelas configura\u00e7\u00f5es do Microsoft Defender ou pela Pol\u00edtica de Grupo, o que pode consumir muito tempo ao lidar com v\u00e1rios sistemas. Esse script oferece uma solu\u00e7\u00e3o automatizada e mais r\u00e1pida. Al\u00e9m disso, esse script pode ser implantado em v\u00e1rios sistemas simultaneamente, enquanto os m\u00e9todos manuais precisariam ser repetidos para cada m\u00e1quina.<\/p>\n<h2>Implica\u00e7\u00f5es<\/h2>\n<p>Ao ativar a prote\u00e7\u00e3o contra PUA, os sistemas ficam protegidos contra uma gama mais ampla de amea\u00e7as. Embora o PUA nem sempre seja prejudicial, ele pode prejudicar o desempenho do sistema ou apresentar problemas de privacidade. O script garante uma camada adicional de seguran\u00e7a de TI, assegurando que aplicativos potencialmente prejudiciais sejam detectados antes que possam ser instalados.<\/p>\n<h2>Recomenda\u00e7\u00f5es<\/h2>\n<ul>\n<li>Sempre execute o script com privil\u00e9gios de administrador.<\/li>\n<li>Certifique-se de que o Microsoft Defender esteja instalado e atualizado antes de executar o script.<\/li>\n<li>Revise e atualize regularmente os scripts para acomodar quaisquer altera\u00e7\u00f5es no comportamento ou nas atualiza\u00e7\u00f5es do software.<\/li>\n<\/ul>\n<h2>Considera\u00e7\u00f5es finais<\/h2>\n<p>No mundo em constante evolu\u00e7\u00e3o da seguran\u00e7a de TI, ferramentas como o NinjaOne s\u00e3o fundamentais. A plataforma integrada da NinjaOne pode incorporar perfeitamente esses scripts, permitindo que os profissionais de TI os gerenciem e implementem sem esfor\u00e7o. Ao automatizar processos como a ativa\u00e7\u00e3o da prote\u00e7\u00e3o contra PUA, as organiza\u00e7\u00f5es podem garantir que estejam sempre um passo \u00e0 frente em seus esfor\u00e7os de seguran\u00e7a cibern\u00e9tica.<\/p>\n","protected":false},"author":35,"featured_media":142536,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","_lmt_disableupdate":"no","_lmt_disable":""},"operating_system":[4212],"use_cases":[12456],"class_list":["post-809292","script_hub","type-script_hub","status-publish","has-post-thumbnail","hentry","script_hub_category-windows"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/script_hub\/809292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/script_hub"}],"about":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/types\/script_hub"}],"author":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/comments?post=809292"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/media\/142536"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/media?parent=809292"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/operating_system?post=809292"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/use_cases?post=809292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}