{"id":808346,"date":"2026-05-14T07:34:18","date_gmt":"2026-05-14T07:34:18","guid":{"rendered":"https:\/\/www.ninjaone.com\/?post_type=script_hub&#038;p=808346"},"modified":"2026-05-14T07:34:18","modified_gmt":"2026-05-14T07:34:18","slug":"desabilitar-o-script-de-atualizacao-do-windows-11-para-powershell","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/pt-br\/script-hub\/desabilitar-o-script-de-atualizacao-do-windows-11-para-powershell\/","title":{"rendered":"Como desativar a atualiza\u00e7\u00e3o autom\u00e1tica do Windows 11 [Script do PowerShell]"},"content":{"rendered":"<p>\u00c0 medida que as empresas em todo o mundo se preparam para se adaptar \u00e0 mais recente itera\u00e7\u00e3o do sistema operacional da Microsoft, muitos profissionais de TI e provedores de servi\u00e7os gerenciados (MSPs) est\u00e3o buscando maneiras de controlar a transi\u00e7\u00e3o. Se a sua organiza\u00e7\u00e3o ainda n\u00e3o est\u00e1 pronta para dar o salto e voc\u00ea est\u00e1 procurando um m\u00e9todo para desativar a atualiza\u00e7\u00e3o autom\u00e1tica do Windows 11, voc\u00ea chegou ao blog certo. Aqui, analisaremos um <strong>script<\/strong> inestim\u00e1vel <strong>do PowerShell que desativa as atualiza\u00e7\u00f5es do Windows 11 de<\/strong> forma eficiente.<\/p>\n<h2>A necessidade de controle<\/h2>\n<p>Antes de mergulhar no script, vale a pena considerar por que algu\u00e9m pode querer desativar as atualiza\u00e7\u00f5es do Windows 11. O Windows 11 vem com uma s\u00e9rie de novos recursos e atualiza\u00e7\u00f5es de seguran\u00e7a, mas todo profissional de TI sabe que novo nem sempre significa melhor &#8211; pelo menos, n\u00e3o imediatamente. Novas vers\u00f5es podem interromper a compatibilidade com o software existente ou criar problemas imprevistos que s\u00f3 podem ser gerenciados depois de conhecidos. Portanto, ter o poder de controlar quando fazer o upgrade pode evitar dores de cabe\u00e7a inesperadas.<\/p>\n<h2>O roteiro:<\/h2>\n<p>Esse script do PowerShell funciona como seu mecanismo de controle. Especificamente, ele desativa a atualiza\u00e7\u00e3o do Windows 11 bloqueando o TargetReleaseVersion e o TargetReleaseVersionInfo para a vers\u00e3o atualmente instalada do sistema operacional Windows. Para uma equipe de profissionais de TI ou MSPs, isso \u00e9 como encontrar ouro; ele oferece uma maneira perfeita de gerenciar centenas ou milhares de m\u00e1quinas.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">&lt;#\r\n.SYNOPSIS\r\n    Disables Windows 11 upgrade.\r\n.DESCRIPTION\r\n    Disables Windows 11 upgrade by locking the TargetReleaseVersion and TargetReleaseVersionInfo to the currently installed version.\r\n.EXAMPLE\r\n    No parameters needed\r\n    Disables Windows 11 upgrade.\r\n.OUTPUTS\r\n    None\r\n.NOTES\r\n    Minimum OS Architecture Supported: Windows 10\r\n    Release Notes:\r\n    Disallows the upgrade offer to Windows 11 to appear to users\r\n    (c) 2023 NinjaOne\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#&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    function Set-ItemProp {\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        # Do not output errors and continue\r\n        $ErrorActionPreference = [System.Management.Automation.ActionPreference]::SilentlyContinue\r\n        if (-not $(Test-Path -Path $Path)) {\r\n            # Check if path does not exist and create the path\r\n            New-Item -Path $Path -Force | Out-Null\r\n        }\r\n        if ((Get-ItemProperty -Path $Path -Name $Name)) {\r\n            # Update property and print out what it was changed from and changed to\r\n            $CurrentValue = Get-ItemProperty -Path $Path -Name $Name\r\n            try {\r\n                Set-ItemProperty -Path $Path -Name $Name -Value $Value -Force -Confirm:$false -ErrorAction Stop | Out-Null\r\n            }\r\n            catch {\r\n                Write-Error $_\r\n            }\r\n            Write-Host \"$Path$Name changed from $CurrentValue to $(Get-ItemProperty -Path $Path -Name $Name)\"\r\n        }\r\n        else {\r\n            # Create property with value\r\n            try {\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                Write-Error $_\r\n            }\r\n            Write-Host \"Set $Path$Name to $(Get-ItemProperty -Path $Path -Name $Name)\"\r\n        }\r\n        $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Continue\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\r\n    # Get Current Version\r\n    $release = (Get-ItemProperty -Path \"HKLM:SOFTWAREMicrosoftWindows NTCurrentVersion\" -Name ReleaseId).ReleaseId\r\n    $ver = (Get-ItemProperty -Path \"HKLM:SOFTWAREMicrosoftWindows NTCurrentVersion\" -Name DisplayVersion).DisplayVersion\r\n    $TargetReleaseVersion = if ($release -eq '2009') { $ver } Else { $release }\r\n\r\n    # Block Windows 11 Upgrade by changing the target release version to the current version\r\n    try {\r\n        Set-ItemProp -Path \"HKLM:SOFTWAREPoliciesMicrosoftWindowsWindowsUpdate\" -Name \"TargetReleaseVersion\" -Value 1 -PropertyType DWord\r\n        Set-ItemProp -Path \"HKLM:SOFTWAREPoliciesMicrosoftWindowsWindowsUpdate\" -Name \"TargetReleaseVersionInfo\" -Value \"$TargetReleaseVersion\" -PropertyType String\r\n        Set-ItemProp -Path \"HKLM:SOFTWAREMicrosoftWindowsUpdateUXSettings\" -Name \"SvOfferDeclined\" -Value 1646085160366 -PropertyType QWord\r\n    }\r\n    catch {\r\n        Write-Error $_\r\n        Write-Host \"Failed to block Windows 11 Upgrade.\"\r\n        exit 1\r\n    }\r\n    exit 0\r\n}\r\nend {}\r\n<\/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>Destaques do roteiro<\/h2>\n<ol>\n<li><strong>Direitos de administrador<\/strong>: O script inclui uma fun\u00e7\u00e3o para verificar se ele foi executado com privil\u00e9gios de administrador, o que \u00e9 essencial para modificar as configura\u00e7\u00f5es do sistema.<\/li>\n<li><strong>Altera\u00e7\u00f5es de registro<\/strong>: O script modifica as configura\u00e7\u00f5es <a href=\"https:\/\/www.ninjaone.com\/blog\/how-to-export-a-windows-registry-key\/\">da chave de registro<\/a>, garantindo que os computadores sigam a pol\u00edtica para permanecer na vers\u00e3o atual.<\/li>\n<li><strong>Escalabilidade<\/strong>: Esse script pode ser implementado em v\u00e1rias m\u00e1quinas, o que o torna uma ferramenta inestim\u00e1vel para os MSPs.<\/li>\n<li><strong>N\u00e3o s\u00e3o necess\u00e1rios par\u00e2metros<\/strong>: Simplificando a experi\u00eancia do usu\u00e1rio, o script n\u00e3o requer nenhum par\u00e2metro para ser executado.<\/li>\n<\/ol>\n<h2>Como usar o script<\/h2>\n<ol>\n<li><strong>Salve o c\u00f3digo<\/strong>: Salve o script em um arquivo com extens\u00e3o .ps1, como DisableWin11Upgrade.ps1.<\/li>\n<li><strong>Executar como administrador<\/strong>: Abra o PowerShell como administrador e navegue at\u00e9 o local onde o script foi salvo.<\/li>\n<li><strong>Executar<\/strong>: Execute .DisableWin11Upgrade.ps1.<\/li>\n<\/ol>\n<p>Se o script for executado com \u00eaxito, ele modificar\u00e1 as entradas de registro necess\u00e1rias para desativar as atualiza\u00e7\u00f5es autom\u00e1ticas do Windows 11.<\/p>\n<h2>Integra\u00e7\u00e3o do script com o NinjaOne<\/h2>\n<p>A integra\u00e7\u00e3o entre esse script do PowerShell para desativar a atualiza\u00e7\u00e3o autom\u00e1tica do Windows 11 e o NinjaOne pode simplificar ainda mais seu processo de gerenciamento de atualiza\u00e7\u00f5es.<\/p>\n<h2>Etapas para a integra\u00e7\u00e3o:<\/h2>\n<ol>\n<li><strong>Fa\u00e7a o upload do script<\/strong>: Use o reposit\u00f3rio de scripts do NinjaOne para carregar o script do PowerShell.<\/li>\n<li><strong>Atribui\u00e7\u00e3o de pol\u00edtica<\/strong>: Depois de carregado, o script pode ser atribu\u00eddo a v\u00e1rias pol\u00edticas que controlam um grupo de sistemas ou ambientes de clientes espec\u00edficos.<\/li>\n<li><strong>Execu\u00e7\u00e3o de cronograma<\/strong>: Com o agendador do NinjaOne, voc\u00ea pode configurar o script para ser executado em intervalos espec\u00edficos ou durante janelas de manuten\u00e7\u00e3o.<\/li>\n<li><strong>Monitoramento &amp; Alertas<\/strong>: Configure o NinjaOne para monitorar as chaves de registro espec\u00edficas que o script modifica. Dessa forma, voc\u00ea ser\u00e1 alertado imediatamente se ocorrer alguma altera\u00e7\u00e3o.<\/li>\n<li><strong>Relat\u00f3rios<\/strong>: Use as ferramentas de relat\u00f3rio do NinjaOne para verificar o sucesso do script em seus sistemas gerenciados.<\/li>\n<\/ol>\n<p>Ao combinar esse script do PowerShell com os recursos robustos do NinjaOne, voc\u00ea n\u00e3o apenas obt\u00e9m um m\u00e9todo para desativar as atualiza\u00e7\u00f5es do Windows 11, mas tamb\u00e9m um sistema para gerenciar, monitorar e gerar relat\u00f3rios sobre essa atividade em escala. Ele acrescenta outra camada de efici\u00eancia e seguran\u00e7a ao seu ambiente de TI.<\/p>\n<h2>Considera\u00e7\u00f5es finais<\/h2>\n<p>Para profissionais de TI e MSPs que lidam com um n\u00famero significativo de sistemas, esse script do PowerShell oferece uma maneira confi\u00e1vel e eficiente de desativar as atualiza\u00e7\u00f5es do Windows 11 em toda a linha. N\u00e3o se trata apenas de resistir \u00e0 mudan\u00e7a; trata-se de control\u00e1-la para melhor atender \u00e0s necessidades de sua organiza\u00e7\u00e3o. Voc\u00ea n\u00e3o est\u00e1 mais sujeito aos caprichos das atualiza\u00e7\u00f5es autom\u00e1ticas que podem interromper seu ambiente de TI cuidadosamente orquestrado.<\/p>\n<p>Talvez voc\u00ea tamb\u00e9m se interesse por <a href=\"https:\/\/www.ninjaone.com\/blog\/enable-windows-11-upgrade-powershell\/\">Como habilitar a atualiza\u00e7\u00e3o autom\u00e1tica do Windows 11 com o PowerShell<\/a>.<\/p>\n","protected":false},"author":35,"featured_media":142415,"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-808346","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\/808346","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=808346"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/media\/142415"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/media?parent=808346"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/operating_system?post=808346"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/use_cases?post=808346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}