Acesso de rede: acesso anônimo restrito a pipes nomeados e compartilhamentos: valor do Registro RestrictNullSessAccessComputadorHKLM\System\CurrentControlSet\Services\LanManServer\Parameters

Categoria
Configurações de segurança › Políticas locais › Opções de segurança
Escopo
Configuração do Computador
Fonte
Windows 11 (versão 26H2 · 26300.9457)

Registro

RestrictNullSessAccess

REG_DWORDComputador
Valor habilitado
1
Valor desabilitado
0
Aplicar com .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters]

; Opções (use apenas uma)
; Habilitada
"RestrictNullSessAccess"=dword:00000001
; Desabilitada
"RestrictNullSessAccess"=dword:00000000
CMD
:: Opções (use apenas uma)

:: Habilitada
reg add "HKLM\System\CurrentControlSet\Services\LanManServer\Parameters" /v "RestrictNullSessAccess" /t REG_DWORD /d 1 /f
:: Desabilitada
reg add "HKLM\System\CurrentControlSet\Services\LanManServer\Parameters" /v "RestrictNullSessAccess" /t REG_DWORD /d 0 /f
PowerShell
# Comum: criar a chave
New-Item -Path 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters' -Force | Out-Null

# Opções (use apenas uma)
# Habilitada
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters' -Name 'RestrictNullSessAccess' -PropertyType DWord -Value 1 -Force | Out-Null
# Desabilitada
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters' -Name 'RestrictNullSessAccess' -PropertyType DWord -Value 0 -Force | Out-Null