Activar la ejecución de scripts: valor del Registro EnableScripts y 1 másUsuarioHKCU\Software\Policies\Microsoft\Windows\PowerShell
- Id. de directiva
- EnableScripts
- Ámbito
- Configuración del equipo, configuración de usuario
- Compatible con
- Al menos familia de Microsoft Windows 7 o Windows Server 2008
- Origen
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (versión 1.0)
- Categoría
- Componentes de Windows › Windows PowerShell
Registro
EnableScripts
REG_DWORDUsuarioEquipo…\Software\Policies\Microsoft\Windows\PowerShellHKCU\Software\Policies\Microsoft\Windows\PowerShell Clave actual
HKLM\Software\Policies\Microsoft\Windows\PowerShell
HKLM\Software\Policies\Microsoft\Windows\PowerShell
- Valor al habilitar
- 1
- Valor al deshabilitar
- 0
Aplicar con .reg · CMD · PowerShell
UsuarioConfiguración por cuenta
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\PowerShell] ; Opciones (usar solo una) ; Habilitada "EnableScripts"=dword:00000001 ; Deshabilitada "EnableScripts"=dword:00000000
CMD
:: Opciones (usar solo una) :: Habilitada reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 1 /f :: Deshabilitada reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 0 /f
PowerShell
# Común: crear la clave New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null # Opciones (usar solo una) # Habilitada New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 1 -Force | Out-Null # Deshabilitada New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 0 -Force | Out-Null
EquipoConfiguración global del equipo
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell] ; Opciones (usar solo una) ; Habilitada "EnableScripts"=dword:00000001 ; Deshabilitada "EnableScripts"=dword:00000000
CMD
:: Opciones (usar solo una) :: Habilitada reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 1 /f :: Deshabilitada reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 0 /f
PowerShell
# Común: crear la clave New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null # Opciones (usar solo una) # Habilitada New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 1 -Force | Out-Null # Deshabilitada New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 0 -Force | Out-Null
ExecutionPolicy
REG_SZUsuarioEquipo…\Software\Policies\Microsoft\Windows\PowerShellHKCU\Software\Policies\Microsoft\Windows\PowerShell Clave actual
HKLM\Software\Policies\Microsoft\Windows\PowerShell
HKLM\Software\Policies\Microsoft\Windows\PowerShell
- Valor al habilitar
- Depende del valor de la opción
- Elemento
- Directiva de ejecución
| Elemento de lista | Valor almacenado |
|---|---|
| Permitir solo scripts firmados | AllSigned |
| Permitir scripts locales y scripts remotos firmados | RemoteSigned |
| Permitir todos los scripts | Unrestricted |
Aplicar con .reg · CMD · PowerShell
UsuarioConfiguración por cuenta
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\PowerShell] ; Opciones (usar solo una) ; Permitir solo scripts firmados "ExecutionPolicy"="AllSigned" ; Permitir scripts locales y scripts remotos firmados "ExecutionPolicy"="RemoteSigned" ; Permitir todos los scripts "ExecutionPolicy"="Unrestricted"
CMD
:: Opciones (usar solo una) :: Permitir solo scripts firmados reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "AllSigned" /f :: Permitir scripts locales y scripts remotos firmados reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "RemoteSigned" /f :: Permitir todos los scripts reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "Unrestricted" /f
PowerShell
# Común: crear la clave New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null # Opciones (usar solo una) # Permitir solo scripts firmados New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'AllSigned' -Force | Out-Null # Permitir scripts locales y scripts remotos firmados New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'RemoteSigned' -Force | Out-Null # Permitir todos los scripts New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'Unrestricted' -Force | Out-Null
EquipoConfiguración global del equipo
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell] ; Opciones (usar solo una) ; Permitir solo scripts firmados "ExecutionPolicy"="AllSigned" ; Permitir scripts locales y scripts remotos firmados "ExecutionPolicy"="RemoteSigned" ; Permitir todos los scripts "ExecutionPolicy"="Unrestricted"
CMD
:: Opciones (usar solo una) :: Permitir solo scripts firmados reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "AllSigned" /f :: Permitir scripts locales y scripts remotos firmados reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "RemoteSigned" /f :: Permitir todos los scripts reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "Unrestricted" /f
PowerShell
# Común: crear la clave New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null # Opciones (usar solo una) # Permitir solo scripts firmados New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'AllSigned' -Force | Out-Null # Permitir scripts locales y scripts remotos firmados New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'RemoteSigned' -Force | Out-Null # Permitir todos los scripts New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'Unrestricted' -Force | Out-Null