我是Linuxpipe理员,从Linux主机执行大部分的pipe理工作。 我使用一个脚本来维护我的Linux补丁程序,这个脚本出来并查询Linux主机,并获得正常运行时间,最后一个补丁date和一些补丁程序。 如果可能的话,我正在从窗口做同样的事情。
我已经研究过Linux的WMIC( http://www.aldeid.com/wiki/wmic-linux ),但从我所看到的它不支持获取Windows更新信息所需的命令集,例如在这里find:
http://pario.no/2011/06/19/list-installed-windows-updates-using-wmic/
虽然最终从linux启动更新会很好,但是现在我只是想获得这些信息。 这样做的主要原因是集中pipe理和汇报。
你想得到wmic qfe get的输出。
我build议使用winexe或salt弥合差距:
$ sudo salt 'win7-salt' cmd.run 'wmic qfe get' | head -n8 win7-salt: Caption CSName Description FixComments HotFixID InstallDate InstalledBy InstalledOn Name ServicePackInEffect Status http://go.microsoft.com/fwlink/?LinkId=133041 WIN7-SALT Update KB2849697 NT AUTHORITY\SYSTEM 3/25/2014 http://go.microsoft.com/fwlink/?LinkId=133041 WIN7-SALT Update KB2849696 NT AUTHORITY\SYSTEM 3/25/2014 http://go.microsoft.com/fwlink/?LinkId=133041 WIN7-SALT Update KB2841134 NT AUTHORITY\SYSTEM 3/25/2014 http://support.microsoft.com/ WIN7-SALT Update KB2670838 WIN7-SALT\netdirect 11/14/2013 http://support.microsoft.com/?kbid=2830477 WIN7-SALT Update KB2830477 WIN7-SALT\netdirect 11/14/2013 http://support.microsoft.com/ WIN7-SALT Update KB2592687 WIN7-SALT\netdirect 11/14/2013