PowerShell İpucu: Komut Dosyası Yoluyla Windows Update Ayarlarını Değiştirin

Womanne

Member
Kısa bir PowerShell betiği ile Windows Update ayarlarını değiştirebilirsiniz. Bunun için Microsoft.Update.AutoUpdate COM sınıfı kullanılır.

Duyuru



$updateObj = New-Object -ComObject "Microsoft.Update.AutoUpdate"
"Bisheriger NotificationLevel: $($updateObj.Settings.NotificationLevel)"
$updateObj.Settings.NotificationLevel = 2
# ' 0 = Never Check for Updates
# ' 1 = Download/Choose whether to install them
# ' 2 = Download/Choose whether to download and install them
# ' 3 = Install automatically

"Neuer NotificationLevel: $($updateObj.Settings.NotificationLevel)"
$updateObj.Settings.Save()


Kurulum süresi gibi diğer ayarlar da buradan okunabilir ve değiştirilebilir.

$updateObj.Settings.ScheduledInstallationDay
$updateObj.Settings.ScheduledInstallationTime

Alternatif olarak, Windows Update için Windows iletişim kutusunu da açabilirsiniz:

$updateObj.ShowSettingsDialog()


()





Haberin Sonu
 
Üst