找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 25755|回复: 10

[技术讨论] PowerShell检查NSA永恒之蓝MS17-010漏洞补丁

[复制链接]
发表于 2017-5-14 10:07:39 | 显示全部楼层 |阅读模式
  1. # Windows XP, Windows Vista, Windows 8, Windows Server 2008
  2. Get-HotFix | Where-Object { $_.HotfixID -eq 'KB4012598' } | Format-Table -AutoSize

  3. # Windows 7 SP1, Windows Server 2008 R2 SP1
  4. Get-HotFix | Where-Object { $_.HotfixID -eq 'KB4012212' -or $_.HotfixID -eq 'KB4012215' } | Format-Table -AutoSize

  5. # Windows 8.1, Windows Server 2012 R2
  6. Get-HotFix | Where-Object { $_.HotfixID -eq 'KB4012213' -or $_.HotfixID -eq 'KB4012216' } | Format-Table -AutoSize

  7. # Windows Server 2012
  8. Get-HotFix | Where-Object { $_.HotfixID -eq 'KB4012214' -or $_.HotfixID -eq 'KB4012217' } | Format-Table -AutoSize

  9. # Windows 10
  10. Get-HotFix | Where-Object { $_.HotfixID -eq 'KB4012606' -or $_.HotfixID -eq 'KB4013198' -or $_.HotfixID -eq 'KB4013429' } | Format-Table -AutoSize
复制代码
参考信息:
https://technet.microsoft.com/zh-cn/library/security/MS17-010
https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/
发表于 2017-5-14 10:20:52 | 显示全部楼层
  1. Get-HotFix : The term 'Get-HotFix' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spellin
  2. g of the name, or if a path was included, verify that the path is correct and try again.
  3. At line:1 char:1
  4. + Get-HotFix | Where-Object { $_.HotfixID -eq 'KB4012606' -or $_.Hotfix ...
  5. + ~~~~~~~~~~
  6.     + CategoryInfo          : ObjectNotFound: (Get-HotFix:String) [], CommandNotFoundException
  7.     + FullyQualifiedErrorId : CommandNotFoundException
复制代码
发表于 2017-5-14 10:21:13 | 显示全部楼层
ps 6.0
windows 7
 楼主| 发表于 2017-5-14 10:53:24 | 显示全部楼层
回复 3# codegay


你的版本好高,我的 Win 7 + PS 4.0 没问题。试试这个呢:
  1. Get-WmiObject -Query "Select * from Win32_QuickFixEngineering where HotFixID= 'KB4012212'"
复制代码
发表于 2017-5-14 11:01:26 | 显示全部楼层
6.0是在官方的github下载安装的。。
  1. PS C:\Program Files\PowerShell\6.0.0.17> Get-WmiObject -Query "Select * from Win32_QuickFixEngineering where HotFixID= 'KB4012212'"
  2. Get-WmiObject : The term 'Get-WmiObject' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the s
  3. pelling of the name, or if a path was included, verify that the path is correct and try again.
  4. At line:1 char:1
  5. + Get-WmiObject -Query "Select * from Win32_QuickFixEngineering where H ...
  6. + ~~~~~~~~~~~~~
  7.     + CategoryInfo          : ObjectNotFound: (Get-WmiObject:String) [], CommandNotFoundException
  8.     + FullyQualifiedErrorId : CommandNotFoundException
复制代码
对PS不懂。不知道是怎么回事了。
发表于 2017-5-14 11:05:34 | 显示全部楼层
表示端口全部关了……
发表于 2017-5-14 11:11:04 | 显示全部楼层
回复 5# codegay


    Get-WmiObject和Get-HotFix这俩个Cmdlet都没有……
发表于 2017-5-14 12:03:23 | 显示全部楼层
回复 7# 老刘1号


    不是我不知道没有。
而是我不知道为什么没有。
 楼主| 发表于 2017-5-14 19:01:42 | 显示全部楼层
回复 5# codegay


    6.0现在是Beta版吧,不知道将来GA的版本会怎样。
发表于 2017-5-18 18:57:50 | 显示全部楼层
命令行下用 systeminfo | find "KB4012606" 是不是更简单些?
 楼主| 发表于 2017-5-18 19:33:56 | 显示全部楼层
回复 10# xxbdh


    我的Win7安装KB4012212之后用这个方法查不出来
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-17 05:14 , Processed in 0.020670 second(s), 8 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表