Windows · PowerShell

Windows Bekleyen Yeniden Başlatma Kontrolü

Windows Update, bileşen tabanlı bakım (CBS) ve bekleyen dosya taşıma kayıtlarını kontrol eder. Yeniden başlatma gerekiyorsa nedenini yazar.

Script Kütüphanesi
Canlı veri
28script
  • Windows18
  • macOS5
  • Linux5
Kategoriye göre
  • Ağ3
  • Disk ve depolama4
  • Envanter4
  • Güvenlik9
  • Güncellemeler4
  • Bakım4
Son inceleme: 6 Kasım 2026
KOD

Script

check-pending-reboot-windows.ps1
$reasons = @()
if (Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending') { $reasons += 'CBS' }
if (Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired') { $reasons += 'WindowsUpdate' }
$pfro = Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name PendingFileRenameOperations -ErrorAction SilentlyContinue
if ($pfro) { $reasons += 'PendingFileRename' }
if ($reasons) { Write-Output "Reboot pending: $($reasons -join ', ')"; exit 1 } else { Write-Output 'No reboot pending.' }
Dikkat: Script çalıştırmak hassas bir işlemdir. Kodu okumadan çalıştırmayın. Sıfırdan farklı çıkış kodu Moftgate çıktısında hata olarak görünür.
NASIL ÇALIŞIR

Moftgate ile tüm cihazlarda çalıştırın

  1. 01

    Scripti ekleyin

    Moftgate konsolunda Scripts > New script açın ve kodu yapıştırın.

  2. 02

    Sistemi seçin

    Hedef işletim sistemi olarak Windows seçin.

  3. 03

    Test edin

    Önce tek bir test cihazında çalıştırın ve çıktıyı okuyun.

  4. 04

    Yayın

    Grup, profil veya etiket seçerek tüm hedeflere gönderin. Her cihazın sonucu ayrı kaydedilir.

Scripts rehberini okuyun →

KURUMSAL GÜVENLİK & İŞ SÜREKLİLİĞİ

Scriptleri tek panelden yönetin

Hedef seçimi, onay adımı, cihaz bazlı çıktı ve denetim kaydı. İlk yıl 200 endpoint ücretsiz.