{"id":208122,"date":"2023-09-27T09:48:37","date_gmt":"2023-09-27T09:48:37","guid":{"rendered":"https:\/\/www.ninjaone.com\/script-hub\/abilitare-protezione-pua-ms-defender-powershell-2\/"},"modified":"2024-03-04T19:08:46","modified_gmt":"2024-03-04T19:08:46","slug":"abilitare-protezione-pua-ms-defender-powershell-2","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/it\/script-hub\/abilitare-protezione-pua-ms-defender-powershell-2\/","title":{"rendered":"Come abilitare la protezione PUA in MS Defender utilizzando PowerShell"},"content":{"rendered":"<p><span class=\"TextRun SCXW70019185 BCX0\" lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW70019185 BCX0\">Nel panorama della sicurezza informatica, la continua evoluzione delle minacce ha reso le misure proattive una necessit\u00e0 per qualsiasi organizzazione. Una di queste misure \u00e8 la protezione PUA (Potentially Unwanted Application), una funzionalit\u00e0 di Microsoft Defender che aiuta a prevenire l&#8217;installazione di software indesiderato. Assicurandosi che i sistemi siano protetti da queste potenziali minacce, i professionisti IT e gli MSP (Managed Service Provider) possono migliorare in modo significativo il livello di sicurezza.<\/span><\/span><\/p>\n<h2>Background<\/h2>\n<p><span class=\"TextRun SCXW146760407 BCX0\" lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW146760407 BCX0\">La protezione PUA, come parte di Microsoft Defender, \u00e8 una funzionalit\u00e0 che rileva e blocca applicazioni <\/span><span class=\"NormalTextRun SCXW146760407 BCX0\">non<\/span><span class=\"NormalTextRun SCXW146760407 BCX0\"> necessariamente dannose, ma che possono essere indesiderate a causa del loro comportamento o impatto sul sistema. L&#8217;importanza di questo script non pu\u00f2 essere sottovalutata. I professionisti IT e gli MSP hanno bisogno di strumenti per garantire la sicurezza dei loro sistemi e abilitare la protezione PUA \u00e8 uno di questi strumenti critici. Con un numero crescente di software distribuiti online, il rischio di scaricare e installare inavvertitamente applicazioni indesiderate \u00e8 pi\u00f9 alto che mai.<\/span><\/span><\/p>\n<h2>Lo script per abilitare la protezione PUA<\/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>Accedi a oltre 300 script nel Dojo di NinjaOne<\/p>\n<p><a href=\"https:\/\/www.ninjaone.com\/it\/prova-gratuita\/\">Ottieni l&#8217;accesso<\/a><\/p>\n<\/div>\n<h2>Situazioni d&#8217;uso potenziali<\/h2>\n<p><span class=\"NormalTextRun SCXW136660925 BCX0\">Immagina una professionista IT, Jane, in un&#8217;azienda di medie dimensioni. Di recente l&#8217;azienda ha dovuto affrontare problemi con i dipendenti che hanno scaricato un software che, pur non essendo di per s\u00e9 dannoso, <\/span><span class=\"NormalTextRun SCXW136660925 BCX0\">ha avuto un impatto<\/span><span class=\"NormalTextRun SCXW136660925 BCX0\"> sulle prestazioni del sistema e ha potenzialmente compromesso la privacy dei dati. Jane pu\u00f2 distribuire questo script su tutti i sistemi aziendali, per assicurarsi che la protezione PUA sia abilitata, riducendo il rischio di installazioni di questo tipo in futuro.<\/span><\/p>\n<h2>Approccio alternativo<\/h2>\n<p><span class=\"TextRun SCXW219867730 BCX0\" lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW219867730 BCX0\">Attivare in modo manuale la protezione PUA comporta la navigazione nelle impostazioni di Microsoft Defender o nei Criteri di gruppo, il che pu\u00f2 richiedere molto tempo quando si ha a che fare con pi\u00f9 sistemi. Questo script <\/span><span class=\"NormalTextRun SCXW219867730 BCX0\">offre<\/span><span class=\"NormalTextRun SCXW219867730 BCX0\"> una soluzione automatizzata e pi\u00f9 veloce. Inoltre, questo script per abilitare la protezione PUA pu\u00f2 essere distribuito su pi\u00f9 sistemi contemporaneamente, <\/span><span class=\"NormalTextRun SCXW219867730 BCX0\">mentre<\/span><span class=\"NormalTextRun SCXW219867730 BCX0\"> i metodi manuali dovrebbero essere ripetuti per ogni macchina<\/span>.<\/span><\/p>\n<h2>Domande frequenti<\/h2>\n<ul style=\"font-weight: 400;\">\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"none\">Il privilegio di amministratore \u00e8 sempre necessario?<\/span><\/b><br \/>\n<span data-contrast=\"none\">S\u00ec, per modificare le impostazioni dell&#8217;intero sistema \u00e8 necessario disporre dei privilegi di amministratore.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"none\">Cosa succede se Microsoft Defender non \u00e8 installato?<\/span><\/b><br \/>\n<span data-contrast=\"none\">Lo script per abilitare la protezione PUA generer\u00e0 un messaggio di errore per informare l&#8217;utente del modulo mancante.<\/span><\/li>\n<\/ul>\n<h2>Implicazioni<\/h2>\n<p><span class=\"TextRun SCXW69187791 BCX0\" lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW69187791 BCX0\">Attivando la protezione PUA, i sistemi sono protetti da una gamma pi\u00f9 ampia di minacce. Anche se le PUA <\/span><span class=\"NormalTextRun SCXW69187791 BCX0\">non sono<\/span><span class=\"NormalTextRun SCXW69187791 BCX0\"> sempre dannose, possono degradare le prestazioni del sistema o far sorgere problemi di privacy. Lo script garantisce un ulteriore livello di sicurezza informatica, assicurando che le applicazioni potenzialmente dannose vengano catturate prima che possano essere installate.<\/span><\/span><\/p>\n<h2>Suggerimenti<\/h2>\n<ul style=\"font-weight: 400;\">\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"none\">Esegui sempre lo script per abilitare la protezione PUA con privilegi di amministratore.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"none\">Assicurati che Microsoft Defender sia installato e aggiornato prima di eseguire lo script.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"none\">Controlla e aggiorna regolarmente gli script per adattarli a eventuali modifiche del comportamento o degli aggiornamenti del software.<\/span><\/li>\n<\/ul>\n<h2>Considerazioni finali<\/h2>\n<p><span class=\"TextRun SCXW98740475 BCX0\" lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW98740475 BCX0\">Nel mondo in continua evoluzione della sicurezza informatica, strumenti come <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW98740475 BCX0\">NinjaOne<\/span><span class=\"NormalTextRun SCXW98740475 BCX0\"> sono fondamentali. La piattaforma integrata <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW98740475 BCX0\">NinjaOne<\/span><span class=\"NormalTextRun SCXW98740475 BCX0\"> potrebbe incorporare senza problemi tali script, consentendo ai professionisti IT di gestirli e distribuirli senza sforzo. Automatizzando processi come l&#8217;abilitazione della protezione PUA, le organizzazioni possono garantire <\/span><span class=\"NormalTextRun SCXW98740475 BCX0\">di essere<\/span><span class=\"NormalTextRun SCXW98740475 BCX0\"> sempre un passo avanti nei loro sforzi per la sicurezza informatica.<\/span><\/span><span class=\"EOP SCXW98740475 BCX0\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n","protected":false},"author":35,"featured_media":207163,"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":[4275],"class_list":["post-208122","script_hub","type-script_hub","status-publish","has-post-thumbnail","hentry","script_hub_category-windows"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/script_hub\/208122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/script_hub"}],"about":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/types\/script_hub"}],"author":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/comments?post=208122"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/media\/207163"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/media?parent=208122"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/operating_system?post=208122"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/use_cases?post=208122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}