vbscript to check windowsupdate.com

Set updateSession = CreateObject(“Microsoft.Update.Session”)

‘ Search windowsupdate.com for updates

Set updateSearcher = updateSession.CreateUpdateSearcher()

WScript.Echo “Searching for updates…” & vbCRLF

 Set searchResult = _

updateSearcher.Search(“IsInstalled=0 and Type=’Software’ and IsHidden=0”)

 WScript.Echo “List of updates available for server:”

 For I = 0 To searchResult.Updates.Count-1

    Set update = searchResult.Updates.Item(I)

    WScript.Echo I + 1 & “> ” & update.Title


 If searchResult.Updates.Count = 0 Then

    WScript.Echo “There are no applicable updates.”


End If


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s