Oturum saatleri sona erdiğinde yapılacak eylemi belirle: kayıt defteri değeri LogonHoursActionKullanıcıHKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System

İlke Kimliği
LogonHoursPolicyDescription
Kapsam
Kullanıcı Yapılandırması
Desteklenen işletim sistemleri
En azından Windows Vista
Kaynak
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (sürüm 1.0)
Kategori
Windows Bileşenleri › Windows Oturum Açma Seçenekleri

Kayıt defteri

LogonHoursAction

REG_DWORDKullanıcı
Etkin değeri
Seçenek değerine bağlıdır
Öğe
Oturum saatleri sona erdiğinde yapılacak eylemi belirle
Seçenekler
MaddeSaklanan değer
Kilitle1
Bağlantıyı Kes2
Oturum Kapat3
.reg · CMD · PowerShell ile uygula
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]

; Seçenekler (yalnızca birini kullanın)
; Kilitle
"LogonHoursAction"=dword:00000001
; Bağlantıyı Kes
"LogonHoursAction"=dword:00000002
; Oturum Kapat
"LogonHoursAction"=dword:00000003
CMD
:: Seçenekler (yalnızca birini kullanın)

:: Kilitle
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "LogonHoursAction" /t REG_DWORD /d 1 /f
:: Bağlantıyı Kes
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "LogonHoursAction" /t REG_DWORD /d 2 /f
:: Oturum Kapat
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "LogonHoursAction" /t REG_DWORD /d 3 /f
PowerShell
# Ortak: anahtarı oluştur
New-Item -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Force | Out-Null

# Seçenekler (yalnızca birini kullanın)
# Kilitle
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'LogonHoursAction' -PropertyType DWord -Value 1 -Force | Out-Null
# Bağlantıyı Kes
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'LogonHoursAction' -PropertyType DWord -Value 2 -Force | Out-Null
# Oturum Kapat
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'LogonHoursAction' -PropertyType DWord -Value 3 -Force | Out-Null