Windows Update-Agent VB: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „=Powershell als Administator öffnen= *cd \ *curl http://download.windowsupdate.com/microsoftupdate/v6/wsusscan/wsusscn2.cab -O wsusscn2.cab =VB Script= C:\Wi…“) |
|||
| Zeile 35: | Zeile 35: | ||
</pre> | </pre> | ||
| + | =Ausfhühren= | ||
| + | *C:\Windows\system32\wsusscn2.vba | ||
| + | |||
| + | [[Datei:Wua-1.png]] | ||
| + | |||
| + | [[Datei:Wua-2.png]] | ||
=Links= | =Links= | ||
*https://docs.microsoft.com/de-de/windows/win32/wua_sdk/using-wua-to-scan-for-updates-offline | *https://docs.microsoft.com/de-de/windows/win32/wua_sdk/using-wua-to-scan-for-updates-offline | ||
Version vom 14. November 2021, 10:52 Uhr
Powershell als Administator öffnen
- cd \
- curl http://download.windowsupdate.com/microsoftupdate/v6/wsusscan/wsusscn2.cab -O wsusscn2.cab
VB Script
C:\Windows\system32\wsusscn2.vba
Set UpdateSession = CreateObject("Microsoft.Update.Session")
Set UpdateServiceManager = CreateObject("Microsoft.Update.ServiceManager")
Set UpdateService = UpdateServiceManager.AddScanPackageService("Offline Sync Service", "c:\wsusscn2.cab", 1)
Set UpdateSearcher = UpdateSession.CreateUpdateSearcher()
WScript.Echo "Searching for updates..." & vbCRLF
UpdateSearcher.ServerSelection = 3 ' ssOthers
UpdateSearcher.ServiceID = UpdateService.ServiceID
Set SearchResult = UpdateSearcher.Search("IsInstalled=0")
Set Updates = SearchResult.Updates
If searchResult.Updates.Count = 0 Then
WScript.Echo "There are no applicable updates."
WScript.Quit
End If
WScript.Echo "List of applicable items on the machine when using wssuscan.cab:" & vbCRLF
For I = 0 to searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
WScript.Echo I + 1 & "> " & update.Title
Next
WScript.Quit
Ausfhühren
- C:\Windows\system32\wsusscn2.vba

