Turn on Script Execution: registerwaarde EnableScripts en 1 meerGebruikerHKCU\Software\Policies\Microsoft\Windows\PowerShell

Geen officiële Nederlandse tekst (Engelse originele tekst)

Beleids-ID
EnableScripts
Bereik
Computerconfiguratie, Gebruikersconfiguratie
Ondersteund op
At least Microsoft Windows 7 or Windows Server 2008 family
Bron
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (versie 1.0)
Categorie
Windows-onderdelen › Windows PowerShell

Register

EnableScripts

REG_DWORDGebruikerComputer
Waarde bij ingeschakeld
1
Waarde bij uitgeschakeld
0
Toepassen met .reg · CMD · PowerShell
GebruikerInstelling per account
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\PowerShell]

; Opties (gebruik er maar één)
; Ingeschakeld
"EnableScripts"=dword:00000001
; Uitgeschakeld
"EnableScripts"=dword:00000000
CMD
:: Opties (gebruik er maar één)

:: Ingeschakeld
reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 1 /f
:: Uitgeschakeld
reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 0 /f
PowerShell
# Algemeen: sleutel maken
New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null

# Opties (gebruik er maar één)
# Ingeschakeld
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 1 -Force | Out-Null
# Uitgeschakeld
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 0 -Force | Out-Null
ComputerInstelling voor de hele computer
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell]

; Opties (gebruik er maar één)
; Ingeschakeld
"EnableScripts"=dword:00000001
; Uitgeschakeld
"EnableScripts"=dword:00000000
CMD
:: Opties (gebruik er maar één)

:: Ingeschakeld
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 1 /f
:: Uitgeschakeld
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 0 /f
PowerShell
# Algemeen: sleutel maken
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null

# Opties (gebruik er maar één)
# Ingeschakeld
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 1 -Force | Out-Null
# Uitgeschakeld
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 0 -Force | Out-Null

ExecutionPolicy

REG_SZGebruikerComputer
Waarde bij ingeschakeld
Afhankelijk van de waarde van de optie
Element
Execution Policy
Opties
ItemOpgeslagen waarde
Allow only signed scriptsAllSigned
Allow local scripts and remote signed scriptsRemoteSigned
Allow all scriptsUnrestricted
Toepassen met .reg · CMD · PowerShell
GebruikerInstelling per account
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\PowerShell]

; Opties (gebruik er maar één)
; Allow only signed scripts
"ExecutionPolicy"="AllSigned"
; Allow local scripts and remote signed scripts
"ExecutionPolicy"="RemoteSigned"
; Allow all scripts
"ExecutionPolicy"="Unrestricted"
CMD
:: Opties (gebruik er maar één)

:: Allow only signed scripts
reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "AllSigned" /f
:: Allow local scripts and remote signed scripts
reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "RemoteSigned" /f
:: Allow all scripts
reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "Unrestricted" /f
PowerShell
# Algemeen: sleutel maken
New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null

# Opties (gebruik er maar één)
# Allow only signed scripts
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'AllSigned' -Force | Out-Null
# Allow local scripts and remote signed scripts
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'RemoteSigned' -Force | Out-Null
# Allow all scripts
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'Unrestricted' -Force | Out-Null
ComputerInstelling voor de hele computer
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell]

; Opties (gebruik er maar één)
; Allow only signed scripts
"ExecutionPolicy"="AllSigned"
; Allow local scripts and remote signed scripts
"ExecutionPolicy"="RemoteSigned"
; Allow all scripts
"ExecutionPolicy"="Unrestricted"
CMD
:: Opties (gebruik er maar één)

:: Allow only signed scripts
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "AllSigned" /f
:: Allow local scripts and remote signed scripts
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "RemoteSigned" /f
:: Allow all scripts
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "Unrestricted" /f
PowerShell
# Algemeen: sleutel maken
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null

# Opties (gebruik er maar één)
# Allow only signed scripts
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'AllSigned' -Force | Out-Null
# Allow local scripts and remote signed scripts
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'RemoteSigned' -Force | Out-Null
# Allow all scripts
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'ExecutionPolicy' -PropertyType String -Value 'Unrestricted' -Force | Out-Null