Windows Update-Agent VB: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
=Powershell als Administator öffnen= | =Powershell als Administator öffnen= | ||
| − | *cd \ | + | *PS C:\> cd \ |
| − | *curl http://download.windowsupdate.com/microsoftupdate/v6/wsusscan/wsusscn2.cab -O wsusscn2.cab | + | *PS C:\> curl http://download.windowsupdate.com/microsoftupdate/v6/wsusscan/wsusscn2.cab -O wsusscn2.cab |
| + | |||
=VB Script= | =VB Script= | ||
C:\Windows\system32\wsusscn2.vba | C:\Windows\system32\wsusscn2.vba | ||
| Zeile 35: | Zeile 36: | ||
</pre> | </pre> | ||
| − | = | + | =Ausführen= |
*C:\Windows\system32\wsusscn2.vba | *C:\Windows\system32\wsusscn2.vba | ||
Aktuelle Version vom 14. November 2021, 11:11 Uhr
Powershell als Administator öffnen
- PS C:\> cd \
- PS C:\> 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
Ausführen
- C:\Windows\system32\wsusscn2.vba

