I tried finding a solution for this on google without much luck, perhaps someone here开发者_如何学Go knows how to do this?
Not sure if you can do it remotely as such, but you could "fake" it.
Look at the MSDN documentation for the Windows Update Agent API, specifically the article called Searching, Downloading, and Installing Updates. That contains a script that among other things lists the updates ready to be installed. If you take that bit of the script and amend it to instead write a list to a file, then you could copy the script over to a remote computer, execute the script remotely, then read the file (and finally delete the file and the script from the remote computer to clean up).
You can execute a script remotely using WMI, see this CodeProject article for details for doing so from C#: Create a Remote Process using WMI in C#
精彩评论