How do I know if there are pending security updates from cmd or python?

I need to know if Windows is expecting pending security updates from cmd or python.

I found a form for this from cmd:

-First: I do >> C:\Windows\system32\wuauclt.exe /detectnow

-After that: >> Read the %systemroot%\WindowsUpdate.log

file information.

But I believe this is another simple form.

I found there is a library named WUApiLib for C # , does this exist for python or something in style?

+3


source to share


2 answers


You can use Powershell for this kind of thing:



I cannot find a direct way to access WSUS information. You could get them using PyWin32 or ctypes, but I couldn't find any examples.

0


source


You can use the Wuinstall command line tool ( http://www.wuinstall.com ) like this: wuinstall / search lists all pending updates, with the / xmlout parameter you can save the whole list in xml for further processing



0


source







All Articles