Turn on Script Execution: kayıt defteri değeri EnableScripts ve 1 tane dahaBilgisayarHKLM\Software\Policies\Microsoft\Windows\PowerShell

Bu dilde resmi metin yok (İngilizce özgün metin gösteriliyor)

İlke Kimliği
EnableScripts
Kapsam
Bilgisayar Yapılandırması, Kullanıcı Yapılandırması
Desteklenen işletim sistemleri
At least Microsoft Windows 7 or Windows Server 2008 family
Kaynak
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (sürüm 1.0)
Kategori
Windows Bileşenleri › Windows PowerShell

Kayıt defteri

EnableScripts

REG_DWORDBilgisayarKullanıcı
Etkin değeri
1
Devre dışı değeri
0
.reg · CMD · PowerShell ile uygula
BilgisayarMakine genelinde ayar
.reg
Windows Registry Editor Version 5.00

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

; Seçenekler (yalnızca birini kullanın)
; Etkin
"EnableScripts"=dword:00000001
; Devre Dışı
"EnableScripts"=dword:00000000
CMD
:: Seçenekler (yalnızca birini kullanın)

:: Etkin
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 1 /f
:: Devre Dışı
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 0 /f
PowerShell
# Ortak: anahtarı oluştur
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null

# Seçenekler (yalnızca birini kullanın)
# Etkin
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 1 -Force | Out-Null
# Devre Dışı
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 0 -Force | Out-Null
KullanıcıHesap başına ayar
.reg
Windows Registry Editor Version 5.00

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

; Seçenekler (yalnızca birini kullanın)
; Etkin
"EnableScripts"=dword:00000001
; Devre Dışı
"EnableScripts"=dword:00000000
CMD
:: Seçenekler (yalnızca birini kullanın)

:: Etkin
reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 1 /f
:: Devre Dışı
reg add "HKCU\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 0 /f
PowerShell
# Ortak: anahtarı oluştur
New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null

# Seçenekler (yalnızca birini kullanın)
# Etkin
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 1 -Force | Out-Null
# Devre Dışı
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Name 'EnableScripts' -PropertyType DWord -Value 0 -Force | Out-Null

ExecutionPolicy

REG_SZBilgisayarKullanıcı
Etkin değeri
Seçenek değerine bağlıdır
Öğe
Execution Policy
Seçenekler
MaddeSaklanan değer
Allow only signed scriptsAllSigned
Allow local scripts and remote signed scriptsRemoteSigned
Allow all scriptsUnrestricted
.reg · CMD · PowerShell ile uygula
BilgisayarMakine genelinde ayar
.reg
Windows Registry Editor Version 5.00

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

; Seçenekler (yalnızca birini kullanın)
; Allow only signed scripts
"ExecutionPolicy"="AllSigned"
; Allow local scripts and remote signed scripts
"ExecutionPolicy"="RemoteSigned"
; Allow all scripts
"ExecutionPolicy"="Unrestricted"
CMD
:: Seçenekler (yalnızca birini kullanı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
# Ortak: anahtarı oluştur
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null

# Seçenekler (yalnızca birini kullanı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
KullanıcıHesap başına ayar
.reg
Windows Registry Editor Version 5.00

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

; Seçenekler (yalnızca birini kullanın)
; Allow only signed scripts
"ExecutionPolicy"="AllSigned"
; Allow local scripts and remote signed scripts
"ExecutionPolicy"="RemoteSigned"
; Allow all scripts
"ExecutionPolicy"="Unrestricted"
CMD
:: Seçenekler (yalnızca birini kullanı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
# Ortak: anahtarı oluştur
New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell' -Force | Out-Null

# Seçenekler (yalnızca birini kullanı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