Eyl 02

Windows Server 2008 R2 Core Edition üzerinde güncelleştirmeleri yüklemek için birden fazla metod kullanabiliriz.

1. Yöntem:

Öncelikle kullanmakta olduğumuz ayarları görüntülemek için;

cscript scregedit.wsf /AU /v   

  Otomatik Güncelleştirmeleri aktifleştirmek için; 

cscript scregedit.wsf /AU 4

 Otomatik Güncelleştirmeleri devre dışı bırakmak için;

cscript scregedit.wsf /AU 1

2. Yöntem – Script Kullanarak Güncelleştirmeleri Yükleme

Script ile güncelleştirme işlemlerini düzenlemek gözünüzü korkutmasın çünkü technet üzerinde bu işi yapabileceğiniz script düzenlemeleri yer alıyor.

Benim örneğimde kullancağım scriptin adresi : http://msdn.microsoft.com/en-us/library/aa387102%28VS.85%29.aspx

Set updateSession = CreateObject("Microsoft.Update.Session")
Set updateSearcher = updateSession.CreateupdateSearcher()

 WScript.Echo "Searching for updates…" & vbCRLF

Set searchResult = _
updateSearcher.Search("IsInstalled=0 and Type='Software'")

WScript.Echo "List of applicable items on the machine:"

For I = 0 To searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
WScript.Echo I + 1 & "> " & update.Title
Next

If searchResult.Updates.Count = 0 Then
WScript.Echo "There are no applicable updates."
WScript.Quit
End If

WScript.Echo vbCRLF & "Creating collection of updates to download:"

Set updatesToDownload = CreateObject("Microsoft.Update.UpdateColl")

For I = 0 to searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
WScript.Echo I + 1 & "> adding: " & update.Title
updatesToDownload.Add(update)
Next

WScript.Echo vbCRLF & "Downloading updates…"

Set downloader = updateSession.CreateUpdateDownloader()
downloader.Updates = updatesToDownload
downloader.Download()

WScript.Echo  vbCRLF & "List of downloaded updates:"

For I = 0 To searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
If update.IsDownloaded Then
WScript.Echo I + 1 & "> " & update.Title
End If
Next

Set updatesToInstall = CreateObject("Microsoft.Update.UpdateColl")

WScript.Echo  vbCRLF & _
"Creating collection of downloaded updates to install:"

For I = 0 To searchResult.Updates.Count-1
set update = searchResult.Updates.Item(I)
If update.IsDownloaded = true Then
WScript.Echo I + 1 & "> adding:  " & update.Title
updatesToInstall.Add(update)
End If
Next

WScript.Echo  vbCRLF & "Would you like to install updates now? (Y/N)"
strInput = WScript.StdIn.Readline
WScript.Echo

If (strInput = "N" or strInput = "n") Then
WScript.Quit
ElseIf (strInput = "Y" or strInput = "y") Then
WScript.Echo "Installing updates…"
Set installer = updateSession.CreateUpdateInstaller()
installer.Updates = updatesToInstall
Set installationResult = installer.Install()

'Output results of install
WScript.Echo "Installation Result: " & _
installationResult.ResultCode
WScript.Echo "Reboot Required: " & _
installationResult.RebootRequired & vbCRLF
WScript.Echo "Listing of updates installed " & _
"and individual installation results:"

For I = 0 to updatesToInstall.Count – 1
WScript.Echo I + 1 & "> " & _
updatesToInstall.Item(i).Title & _
": " & installationResult.GetUpdateResult(i).ResultCode
Next
End If

 

Yukarıda bulunan kodları bir txt editörüne kopyalayıp WUA_SearchDownloadInstall.vbs adıyla kaydettikten sonra

cscript WUA_SearchDownloadInstall.vbs komutunu çalıştırarak güncelleştirmeleri yükleyebiliriz.

3. Yöntem – SCONFIG Kullanarak Güncelleştirmeleri Yüklemek

Windows Server 2008 R2 Core ile gelen yeni bir araç olan sconfig.cmd'yi kullanarak da güncelleştirme işlemleri ile ilgili düzenlemeleri gerçekleştirebiliriz.

sconfig.cmd'yi çalıştırdıktan sonra gelen ekranda 5'e basarak otomatik güncelleştirmelerle ilgili ayarları seçeceğimiz parametreleri görüyoruz.

Otomatik güncelleştirmeleri etkinleştirmek için a yazarak enter'a basıyoruz.

Güncelleştirmelerin durumunu kontrol etmek ve var olan güncelleştirmeleri yüklemek için yazıp enter diyoruz.

Önerilen (Recommend) ya da bütün (All) updateleri yükleme seçeneklerinden istediğimizi seçerek güncelleştirmeleri aratıyoruz.

Yaptığımız seçim doğrultusunda güncelleştirmeler sistemimize yükleniyor.

Windows Server 2008 R2 üzerinde güncelleştirmeleri yüklemek için seçeneklerimiz bunlarla da sınırlı değil.

İsterseniz http://ctxadmtools.musumeci.com.ar/VisualCore2008/VisualCore11_Beta2_Refresh.html adresindeki

3rd party aracı kullanarak da güncelleştirmelerle ilgili düzenlemeleri yapabilirsiniz. Umarım yararlı olmuştur.

Yazar ceyhun çamlı \\ tags: , , , ,