{"id":390346,"date":"2024-12-11T05:26:53","date_gmt":"2024-12-11T05:26:53","guid":{"rendered":"https:\/\/www.ninjaone.com\/?post_type=script_hub&#038;p=390346"},"modified":"2024-12-11T05:27:40","modified_gmt":"2024-12-11T05:27:40","slug":"script-per-disabilitare-il-login-automatico","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/it\/script-hub\/script-per-disabilitare-il-login-automatico\/","title":{"rendered":"Migliorare la sicurezza con PowerShell: disabilitare il login automatico e imporre la pressione di CTRL+ALT+CANC\u00a0"},"content":{"rendered":"<p>Negli ambienti IT la sicurezza \u00e8 fondamentale e ogni livello di difesa \u00e8 importante. Una misura di sicurezza spesso trascurata \u00e8 quella di richiedere agli utenti di premere\u00a0<strong>CTRL+ALT+CANC<\/strong>\u00a0prima di accedere. Questa azione agisce come una sequenza di sicurezza o secure attention sequence (SAS), assicurando che la schermata di accesso sia autentica e non un&#8217;interfaccia contraffatta creata da un malware.<\/p>\n<p>Per i professionisti IT e i <a href=\"https:\/\/www.ninjaone.com\/it\/cos-e-un-msp\">fornitori di servizi gestiti (MSP)<\/a>, l&#8217;automazione di queste attivit\u00e0 pu\u00f2 far risparmiare tempo e garantire la coerenza. Lo script <a href=\"https:\/\/www.ninjaone.com\/it\/it-hub\/gestione-degli-endpoint\/cos-e-powershell\">PowerShell<\/a> fornito fa proprio questo: disabilita il login automatico e impone il requisito <strong>CTRL+ALT+CANC<\/strong>\u00a0sui sistemi Windows.<\/p>\n<h2>Comprendere la necessit\u00e0 di pratiche di accesso sicure<\/h2>\n<p>Il requisito\u00a0<strong>CTRL+ALT+CANC<\/strong>\u00a0non \u00e8 come potrebbe sembrare solo un fastidio per l&#8217;utente, ma offre vantaggi critici per la sicurezza. Questa combinazione garantisce che gli utenti interagiscano con il sottosistema di autenticazione sicura del sistema operativo piuttosto che con programmi potenzialmente dannosi. Inoltre, la disabilitare il login automatico impedisce l&#8217;accesso non autorizzato in ambienti condivisi o sensibili. I professionisti IT che gestiscono un gran numero di dispositivi possono trovare questo script prezioso per implementare rapidamente queste impostazioni nei vari sistemi.<\/p>\n<h2>Lo script per disabilitare il login automatico:<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">#Requires -Version 5.1\r\n\r\n&lt;#\r\n.SYNOPSIS\r\n    Disables the automatic login feature and requires 'CTRL', 'ALT', and 'DELETE' to be pressed each time a user signs in. Once 'Interactive logon: Do not require CTRL+ALT+DEL' is apart of the security policy it cannot be removed from the policy. It either has to be enabled or disabled.\r\n.DESCRIPTION\r\n    Disables the automatic login feature and requires 'CTRL', 'ALT', and 'DELETE' to be pressed each time a user signs in. Once 'Interactive logon: Do not require CTRL+ALT+DEL' is apart of the security policy it cannot be removed from the policy. It either has to be enabled or disabled.\r\n\r\n    By 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.EXAMPLE\r\n    (No Parameters)\r\n    \r\n    Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\AutoAdminLogon changed from 1 to 0\r\n    Retrieving existing security policy...\r\n                                                                            \r\n    The task has completed successfully.\r\n    See log %windir%\\security\\logs\\scesrv.log for detail info.\r\n    Modifying policy to require Ctrl Alt Del to be pressed on login.\r\n    Applying updated policy...\r\n    Completed 5 percent (0\/18) \tProcess Security Policy area        \r\n    Completed 22 percent (3\/18) \tProcess Security Policy area        \r\n    Completed 44 percent (7\/18) \tProcess Security Policy area        \r\n    Completed 61 percent (10\/18) \tProcess Security Policy area        \r\n    Completed 77 percent (13\/18) \tProcess Security Policy area        \r\n    Completed 100 percent (18\/18) \tProcess Security Policy area        \r\n                                                                            \r\n    The task has completed successfully.\r\n    See log %windir%\\security\\logs\\scesrv.log for detail info.\r\n\r\nPARAMETER: -MicrosoftDefaults\r\n    Reverts all the modified settings to their Microsoft default value.\r\n\r\nPARAMETER: -ForceRestart\r\n    Schedules a restart for 60 seconds from now so that the CTRL+ALT+DEL login requirement may take immediate effect.\r\n\r\n.NOTES\r\n    Minimum OS Architecture Supported: Windows 10, Windows Server 2016\r\n    Release Notes: Initial Release\r\n#&gt;\r\n\r\n[CmdletBinding()]\r\nparam (\r\n    [Parameter()]\r\n    [Switch]$MicrosoftDefaults = [System.Convert]::ToBoolean($env:revertToMicrosoftDefaults),\r\n    [Parameter()]\r\n    [Switch]$ForceRestart = [System.Convert]::ToBoolean($env:forceRestart)\r\n)\r\n\r\nbegin {\r\n\r\n    function Test-IsDomainJoined {\r\n        if ($PSVersionTable.PSVersion.Major -lt 5) {\r\n            return $(Get-WmiObject -Class Win32_ComputerSystem).PartOfDomain\r\n        }\r\n        else {\r\n            return $(Get-CimInstance -Class Win32_ComputerSystem).PartOfDomain\r\n        }\r\n    }\r\n\r\n    function Set-RegKey {\r\n        param (\r\n            $Path,\r\n            $Name,\r\n            $Value,\r\n            [ValidateSet(\"DWord\", \"QWord\", \"String\", \"ExpandedString\", \"Binary\", \"MultiString\", \"Unknown\")]\r\n            $PropertyType = \"DWord\"\r\n        )\r\n\r\n        # Check if the specified path exists, if not, create it.\r\n        if (-not $(Test-Path -Path $Path)) {\r\n            New-Item -Path $Path -Force | Out-Null\r\n        }\r\n\r\n        # Check if the property already exists at the path.\r\n        if ((Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue)) {\r\n\r\n            # Retrieve the current value of the registry key.\r\n            $CurrentValue = (Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name\r\n            try {\r\n                # Attempt to update the property's value.\r\n                Set-ItemProperty -Path $Path -Name $Name -Value $Value -Force -Confirm:$false -ErrorAction Stop | Out-Null\r\n            }\r\n            catch {\r\n                # If an error occurs during the update, print an error message and exit.\r\n                Write-Host \"[Error] Unable to Set registry key for $Name please see below error!\"\r\n                Write-Host \"[Error] $($_.Message)\"\r\n                exit 1\r\n            }\r\n            # Print a confirmation of the change.\r\n            Write-Host \"$Path\\$Name changed from $CurrentValue to $($(Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name)\"\r\n        }\r\n        else {\r\n            try {\r\n                # If the property does not exist, create it with the specified value and type.\r\n                New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType $PropertyType -Force -Confirm:$false -ErrorAction Stop | Out-Null\r\n            }\r\n            catch {\r\n                # If an error occurs during creation, print an error message and exit.\r\n                Write-Host \"[Error] Unable to Set registry key for $Name please see below error!\"\r\n                Write-Host \"[Error] $($_.Exception.Message)\"\r\n                exit 1\r\n            }\r\n\r\n            # Print a confirmation of the change.\r\n            Write-Host \"Set $Path\\$Name to $($(Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name)\"\r\n        }\r\n    }\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\n    if (!$ExitCode) {\r\n        $ExitCode = 0\r\n    }\r\n}\r\nprocess {\r\n    # Check if the current user session is elevated with administrator privileges. If not, display an error message and exit the script.\r\n    if (!(Test-IsElevated)) {\r\n        Write-Host -Object \"[Error] Access Denied. Please run with Administrator privileges.\"\r\n        exit 1\r\n    }\r\n\r\n    # Retrieve the AutoAdminLogon and DefaultPassword registry values to check for automatic login settings and stored passwords.\r\n    $AutoLogin = Get-ItemProperty -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"AutoAdminLogon\" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty \"AutoAdminLogon\" -ErrorAction SilentlyContinue\r\n    $DefaultPassword = Get-ItemProperty -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"DefaultPassword\" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty \"DefaultPassword\" -ErrorAction SilentlyContinue\r\n    $PasswordLessSetting = Get-ItemProperty -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\PasswordLess\\Device\" -Name \"DevicePasswordLessBuildVersion\" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty \"DevicePasswordLessBuildVersion\" -ErrorAction SilentlyContinue\r\n\r\n    # Alert if a password is stored in the registry, which might be insecure if in plain text.\r\n    if ($DefaultPassword) {\r\n        Write-Host \"[Alert] A Password is stored in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\DefaultPassword. This password is likely in plain text.\"\r\n    }\r\n\r\n    # Check if the device is part of a domain, and if so, recommend using group policy for login settings.\r\n    if (Test-IsDomainJoined) {\r\n        Write-Host \"[Error] This device is domain joined. CTRL ALT Delete login should be setup using group policy.\"\r\n        Write-Host \"[Info] Group Policy Location: Computer Configuration &gt; Windows Settings &gt; Security Settings &gt; Local Policies &gt; Security Options &gt; Interactive logon:(...)\"\r\n        Write-Host \"[Info] https:\/\/learn.microsoft.com\/en-us\/previous-versions\/windows\/it-pro\/windows-10\/security\/threat-protection\/security-policy-settings\/interactive-logon-do-not-require-ctrl-alt-del\"\r\n        exit 1\r\n    }\r\n\r\n    # Turn off automatic login if it is enabled.\r\n    if ($AutoLogin -ne 0) {\r\n        Set-RegKey -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"AutoAdminLogon\" -Value 0\r\n    }\r\n\r\n    # Disable automatic login if it is enabled\r\n    if ($PasswordLessSetting -eq 0) {\r\n        Set-RegKey -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\PasswordLess\\Device\" -Name \"DevicePasswordLessBuildVersion\" -Value 2\r\n    }\r\n\r\n    # Announce the start of the security policy retrieval process.\r\n    Write-Host \"Retrieving existing security policy...\"\r\n\r\n    # Export the current security policy and record the output to a temporary file.\r\n    $SecurityPolicyPath = \"$env:TEMP\\enable-ctrlaltdellogin.cfg\"\r\n    $OutputPath = \"$env:TEMP\\enable-ctrlaltdellogin.txt\"\r\n    $ExportPolicy = Start-Process SecEdit.exe -ArgumentList \"\/export \/cfg $SecurityPolicyPath\" -RedirectStandardOutput $OutputPath -NoNewWindow -Wait -PassThru\r\n    $ExportPolicyOutput = Get-Content -Path $OutputPath\r\n\r\n    # Display the output of the policy export and clean up the temporary file.\r\n    if ($ExportPolicyOutput) {\r\n        $ExportPolicyOutput | Write-Host\r\n        Remove-Item $OutputPath\r\n    }\r\n\r\n    # Check the exit code of the export process and display an error message if the export failed.\r\n    if ($ExportPolicy.ExitCode -ne 0) {\r\n        Write-Host -Object \"Exit Code: $($ExportPolicy.ExitCode)\"\r\n        Write-Host -Object \"[Error] Unable to edit security policy.\"\r\n        exit 1\r\n    }\r\n    \r\n    # Check if Microsoft default setting is specifed.\r\n    if ($MicrosoftDefaults) {\r\n        Write-Host \"Removing Ctrl Alt Del requirement from security policy...\"\r\n\r\n        # Initialize a new list to store modified security policy settings.\r\n        $NewSecPolicy = New-Object System.Collections.Generic.List[string]\r\n\r\n        # Read the current security policy and process each line.\r\n        Get-Content $SecurityPolicyPath | ForEach-Object {\r\n\r\n            # If the line contains settings for CTRL ALT DEL, reset the value.\r\n            if ($_ -match \"DisableCAD\") {\r\n                $NewSecPolicy.Add(($_ -replace \",.*\", \",1\"))\r\n            }\r\n            else {\r\n                $NewSecPolicy.Add($_)\r\n            }\r\n        }\r\n\r\n        # Write the modified security policy back to the configuration file.\r\n        $NewSecPolicy | Out-File $SecurityPolicyPath\r\n\r\n        Write-Host \"Applying updated policy...\"\r\n        # Apply the modified security policy using SecEdit.exe.\r\n        $UpdateSecurityPolicy = Start-Process SecEdit.exe -ArgumentList \"\/configure \/db c:\\windows\\security\\local.sdb \/cfg $SecurityPolicyPath\" -RedirectStandardOutput $OutputPath -Wait -NoNewWindow -PassThru\r\n    \r\n        # Capture the output from the policy update and display it.\r\n        $UpdatePolicyOutput = Get-Content -Path $OutputPath\r\n        if ($UpdatePolicyOutput) {\r\n            $UpdatePolicyOutput | Write-Host\r\n            Remove-Item $OutputPath\r\n        }\r\n    \r\n\r\n        # Check the exit code of the policy update process and handle errors.\r\n        if ($UpdateSecurityPolicy.ExitCode -ne 0) {\r\n            Write-Host -Object \"Exit Code: $($UpdateSecurityPolicy.ExitCode)\"\r\n            Write-Host -Object \"[Error] Unable to update security policy.\"\r\n            exit 1\r\n        }\r\n        else {\r\n            if ($ForceRestart) {\r\n                Write-Warning -Message \"Scheduling system restart for 60 seconds from now. $((Get-Date).AddMinutes(60))\"\r\n                Start-Process shutdown.exe -ArgumentList \"\/r \/t 60\" -Wait -NoNewWindow\r\n            }\r\n            else {\r\n                Write-Warning -Message \"A restart may be required for the Ctrl Alt Del requirement to be removed. Please restart at your earliest convenience.\"\r\n            }\r\n            \r\n            exit $ExitCode\r\n        }\r\n    }\r\n\r\n    # Begin modification to require ctrl alt del in the security policy.\r\n    Write-Host \"Modifying policy to require Ctrl Alt Del to be pressed on login.\"\r\n\r\n    # Check if the current policy already includes a ctrl alt del requirement.\r\n    if (Get-Content $SecurityPolicyPath | Where-Object { $_ -like \"*DisableCAD*\" }) {\r\n        # Replace the existing title with a new one, maintaining other parts of the line.\r\n        $Caption = (Get-Content $SecurityPolicyPath | Where-Object { $_ -like \"*DisableCAD*\" }) -replace ',.*', \",0\"\r\n        (Get-Content $SecurityPolicyPath) -replace \".*DisableCAD.*\", \"$Caption\" | Out-File $SecurityPolicyPath\r\n    }\r\n    else {\r\n        # If setting is not present, create a new list for the modified policy settings.\r\n        $NewSecPolicy = New-Object System.Collections.Generic.List[string]\r\n        # Create the new setting.\r\n        $Caption = \"MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableCAD=4,0\"\r\n\r\n        # Read the current policy and add the new setting where appropriate.\r\n        Get-Content $SecurityPolicyPath | ForEach-Object {\r\n            if ($_ -match \"\\[Registry Values\\]\") {\r\n                $NewSecPolicy.Add($_)\r\n                $NewSecPolicy.Add($Caption)\r\n            }\r\n            else {\r\n                $NewSecPolicy.Add($_)\r\n            }\r\n        }\r\n\r\n        # Write the modified settings back to the configuration file.\r\n        $NewSecPolicy | Out-File $SecurityPolicyPath\r\n    }\r\n\r\n    # Display a message indicating that the updated security policy is being applied.\r\n    Write-Host \"Applying updated policy...\"\r\n    $UpdateSecurityPolicy = Start-Process SecEdit.exe -ArgumentList \"\/configure \/db c:\\windows\\security\\local.sdb \/cfg $SecurityPolicyPath \/areas securitypolicy\" -RedirectStandardOutput $OutputPath -Wait -NoNewWindow -PassThru\r\n    \r\n    $UpdatePolicyOutput = Get-Content -Path $OutputPath\r\n    # If there is any output from the SecEdit process, display it in the console.\r\n    if ($UpdatePolicyOutput) {\r\n        $UpdatePolicyOutput | Write-Host\r\n        Remove-Item $OutputPath\r\n    }\r\n    \r\n\r\n    # Check if the SecEdit process completed successfully by examining the exit code.\r\n    if ($UpdateSecurityPolicy.ExitCode -ne 0) {\r\n        Write-Host -Object \"Exit Code: $($UpdateSecurityPolicy.ExitCode)\"\r\n        Write-Host -Object \"[Error] Unable to update security policy.\"\r\n        exit 1\r\n    }\r\n\r\n    if ($ForceRestart) {\r\n        Write-Warning -Message \"Scheduling system restart for 60 seconds from now. $((Get-Date).AddMinutes(60))\"\r\n        Start-Process shutdown.exe -ArgumentList \"\/r \/t 60\" -Wait -NoNewWindow\r\n    }\r\n    else {\r\n        Write-Warning -Message \"A restart may be required for the Ctrl Alt Del requirement to take effect. Please restart at your earliest convenience.\"\r\n    }\r\n    \r\n    exit $ExitCode\r\n}\r\nend {\r\n    \r\n    \r\n    \r\n}<\/pre>\n<p>&nbsp;<\/p>\n\n<div class=\"in-context-cta\"><p>Risparmia tempo con gli oltre 300 script del Dojo NinjaOne.<\/p>\n<p>\u2192 <a class=\"waffle-rich-text-link\" href=\"https:\/\/www.ninjaone.com\/it\/prova-gratuita\/\">Accedi oggi stesso<\/a>.<\/p>\n<\/div>\n<h2>Come funziona lo script per disabilitare il login automatico<\/h2>\n<h3>1. Controlli preliminari e funzioni<\/h3>\n<ul>\n<li><strong>Privilegi di amministratore<\/strong>: Lo script per disabilitare il login automatico controlla che sia eseguito con privilegi elevati, fondamentali per modificare le chiavi di registro e i criteri di sicurezza.<\/li>\n<li><strong>Controllo del dominio<\/strong>: Verifica se il dispositivo \u00e8 unito al dominio. Per i computer collegati al dominio, si consiglia di utilizzare i Criteri di gruppo invece di modificare le impostazioni locali.<\/li>\n<li><strong>Funzioni di aiuto<\/strong>:<\/li>\n<li>Test-IsDomainJoined determina l&#8217;appartenenza al dominio.<\/li>\n<li>Set-RegKey gestisce le modifiche al registro, verificando l&#8217;esistenza delle chiavi e procedendo con l&#8217;aggiornamento dei valori secondo le necessit\u00e0.<\/li>\n<li>Test-IsElevated controlla la presenza di diritti amministrativi.<\/li>\n<\/ul>\n<h3>2. Modifiche alle chiavi di registro<\/h3>\n<ul>\n<li>Lo script disabilita\u00a0<strong>AutoAdminLogon<\/strong>\u00a0impostando il valore del registro di sistema a 0. In questo modo si garantisce che gli utenti non possano aggirare l&#8217;autenticazione all&#8217;avvio.<\/li>\n<li>Inoltre, regola il parametro\u00a0<strong>DevicePasswordLessBuildVersion<\/strong>\u00a0per imporre l&#8217;uso della password.<\/li>\n<\/ul>\n<h3>3. Configurazione dei criteri di sicurezza<\/h3>\n<ul>\n<li>Lo script per disabilitare il login automatico esporta il criterio di sicurezza corrente utilizzando SecEdit.exe e lo modifica per applicare i requisiti di accesso con <strong>CTRL+ALT+CANC<\/strong>\u00a0.<\/li>\n<li>Se vengono specificate le impostazioni predefinite di Microsoft, lo script ripristina l&#8217;impostazione\u00a0<strong>DisableCAD<\/strong>\u00a0per consentire l&#8217;aggiramento di\u00a0<strong>CTRL+ALT+CANC<\/strong>.<\/li>\n<\/ul>\n<h3>4. Applicazione del criterio<\/h3>\n<ul>\n<li>Dopo aver modificato il file di configurazione, lo script per disabilitare il login automatico riapplica il criterio di sicurezza per rendere effettive le modifiche.<\/li>\n<li>Se specificato, pianifica un riavvio del sistema per garantire che le nuove impostazioni abbiano effetto immediato.<\/li>\n<\/ul>\n<h3>5. Gestione degli errori e avvisi<\/h3>\n<ul>\n<li>Lo script per disabilitare il login automatico verifica la presenza di potenziali insidie, come le password memorizzate in chiaro o i privilegi insufficienti, e fornisce un riscontro operativo.<\/li>\n<\/ul>\n<h2>Applicazioni pratiche per i professionisti IT<\/h2>\n<h3>Caso d&#8217;uso ipotetico<\/h3>\n<p>Immagina un amministratore IT che gestisce le postazioni di lavoro in un istituto finanziario. Per rispettare le norme di sicurezza, deve imporre la pressione di\u00a0<strong>CTRL+ALT+CANC<\/strong>\u00a0per il login e disabilitare il login automatico su 50 dispositivi. Invece di configurare manualmente ogni macchina, utilizza questo script PowerShell per automatizzare il processo. Lo script per disabilitare il login automatico viene eseguito durante le ore non di punta, applicando le modifiche in modo uniforme e registrando i progressi per la rendicontazione.<\/p>\n<h3>Confronto tra lo script per disabilitare il login automatico e altri metodi<\/h3>\n<p>Mentre questo script fornisce una soluzione robusta per disabilitare il login automatico per i sistemi autonomi, i dispositivi uniti al dominio beneficiano dei Criteri di gruppo, che offrono un controllo e una verifica centralizzati. Tuttavia, per i sistemi non di dominio o per le configurazioni una tantum, lo script supera i metodi manuali grazie alle sue capacit\u00e0 di automazione e di controllo degli errori.<\/p>\n<h2>Domande frequenti<\/h2>\n<h3>D1: Questo script pu\u00f2 essere utilizzato su sistemi collegati a un dominio?<\/h3>\n<p>Lo script lo sconsiglia, consigliando l&#8217;uso di criteri di gruppo per una migliore scalabilit\u00e0 e conformit\u00e0.<\/p>\n<h3>D2: Cosa succede se lo script viene eseguito senza privilegi amministrativi?<\/h3>\n<p>Lo script rileva questo scenario e termina, chiedendo all&#8217;utente di rieseguirlo con permessi elevati.<\/p>\n<h3>D3: Le modifiche avranno effetto immediato?<\/h3>\n<p>La maggior parte delle modifiche viene applicata immediatamente, ma si consiglia di riavviare il sistema affinch\u00e9 il requisito\u00a0<strong>CTRL+ALT+CANC<\/strong>\u00a0abbia pieno effetto.<\/p>\n<h3>D4: Come posso annullare le modifiche?<\/h3>\n<p>Utilizza il parametro -MicrosoftDefaults per riportare le impostazioni ai valori predefiniti di Microsoft.<\/p>\n<h2>Implicazioni per la sicurezza informatica<\/h2>\n<p>Imponendo\u00a0<strong>CTRL+ALT+CANC<\/strong>, le organizzazioni rafforzano le loro difese contro il furto di credenziali e gli attacchi di spoofing. Disabilitare il login automatico riduce il rischio di accesso non autorizzato, in particolare sui dispositivi che si trovano in aree condivise o ad alto traffico. Sebbene questo script riguardi le configurazioni locali, sottolinea l&#8217;importanza delle strategie di sicurezza a pi\u00f9 livelli negli ambienti IT.<\/p>\n<h2>Raccomandazioni per l&#8217;uso dello script per disabilitare il login automatico<\/h2>\n<ol>\n<li><strong>Testa in ambiente controllato<\/strong>: Prima di distribuire in modo ampio, esegui lo script per disabilitare il login automatico su un computer di prova per garantire la compatibilit\u00e0 e i risultati desiderati.<\/li>\n<li><strong>Modifiche al documento<\/strong>: Conserva log di quando e dove viene applicato lo script per disabilitare il login automatico per riferimenti futuri e per la verifica.<\/li>\n<li><strong>Integrazione con l&#8217;automazione<\/strong>: Utilizza strumenti come NinjaOne per pianificare e monitorare l&#8217;esecuzione dello script per disabilitare il login automatico su pi\u00f9 dispositivi.<\/li>\n<\/ol>\n<h2>Considerazioni finali<\/h2>\n<p>L&#8217;automatizzazione delle configurazioni di sicurezza, come disabilitare il login automatico e imporre la pressione di <strong>CTRL+ALT+CANC<\/strong>\u00a0, \u00e8 un compito fondamentale per i professionisti IT. Questo script semplifica il processo, garantendo la conformit\u00e0 e migliorando la sicurezza. Per esigenze di gestione IT pi\u00f9 ampie, strumenti come\u00a0<strong>NinjaOne<\/strong>\u00a0possono semplificare tali operazioni, offrendo controllo centralizzato, reportistica e automazione per gestire <a href=\"https:\/\/www.ninjaone.com\/it\/efficienza-it\">in modo efficiente<\/a> ambienti complessi.<\/p>\n","protected":false},"author":35,"featured_media":0,"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":[4269],"class_list":["post-390346","script_hub","type-script_hub","status-publish","hentry","script_hub_category-windows","use_cases-configurazione-generale"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/script_hub\/390346","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=390346"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/media?parent=390346"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/operating_system?post=390346"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/use_cases?post=390346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}