Ouvrir dans l'explorateur

Autoriser l’accès aux environnements distants

Allow Remote Shell Access

Type
Ordinateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Environnement distant Windows EN : Computer Configuration › Policies › Administrative Templates › Windows Components › Windows Remote Shell
Pris en charge sur
Au minimum Windows Vista EN : At least Windows Vista
Fichier ADMX
WindowsRemoteShell.admx
Nom interne
WindowsRemoteShell/AllowRemoteShellAccess

Explication

Texte français issu de Windows 11 26H2

Ce paramètre de stratégie configure l’accès aux environnements distants.

Si vous activez ce paramètre de stratégie ou si vous ne le configurez pas, les nouvelles connexions d’environnement distant sont acceptées par le serveur.

Si vous désactivez ce paramètre de stratégie, les nouvelles connexions d’environnement distant sont rejetées par le serveur.

This policy setting configures access to remote shells.

If you enable or do not configure this policy setting, new remote shell connections are accepted by the server.

If you set this policy to ‘disabled’, new remote shell connections are rejected by the server.

Registre

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WinRM\Service\WinRS
Nom de la valeur
AllowRemoteShellAccess
ÉtatValeur écrite
ActivéREG_DWORD = 1
DésactivéREG_DWORD = 0

PowerShell

Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.

Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.

Activer

# Activer : WindowsRemoteShell/AllowRemoteShellAccess
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WinRM\Service\WinRS'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowRemoteShellAccess' -Value 1 -Type DWord

Désactiver

# Désactiver : WindowsRemoteShell/AllowRemoteShellAccess
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WinRM\Service\WinRS'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowRemoteShellAccess' -Value 0 -Type DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : WindowsRemoteShell/AllowRemoteShellAccess
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WinRM\Service\WinRS'
Remove-ItemProperty -Path $k -Name 'AllowRemoteShellAccess' -ErrorAction SilentlyContinue

Disponibilité