浏览代码

Adding Publisher check

Added check to display only drivers where publisher is "*Microsoft*"
Amit Banerjee 8 年之前
父节点
当前提交
b4f78fd581
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tls1.2/CheckClientUpdates.ps1

+ 2 - 2
tls1.2/CheckClientUpdates.ps1

@@ -6,7 +6,7 @@
 Function Check-Sqlncli()
 {
     # Fetch the different Native Client installations found on the machine
-    $sqlncli = Get-WmiObject -Class Win32reg_AddRemovePrograms | Where-Object {$_.DisplayName -like "*Native Client*"} | Select DisplayName,Version
+    $sqlncli = Get-WmiObject -Class Win32reg_AddRemovePrograms | Where-Object {$_.DisplayName -like "*Native Client*" -and $_.Publisher -like "*Microsoft*"} | Select DisplayName,Version
     # Check and report if an update is required for each entry found
     foreach ($cli in $sqlncli)
     {
@@ -35,7 +35,7 @@ Function Check-Sqlncli()
 Function Check-SqlODBC()
 {
     # Fetch the different MS SQL ODBC installations found on the machine
-    $sqlodbc = Get-WmiObject -Class Win32reg_AddRemovePrograms | Where-Object {$_.DisplayName -like "*ODBC*"} | Select DisplayName,Version
+    $sqlodbc = Get-WmiObject -Class Win32reg_AddRemovePrograms | Where-Object {$_.DisplayName -like "*ODBC*" -and $_.Publisher -like "*Microsoft*"} | Select DisplayName,Version
     # Check and report if an update is required for each entry found
     foreach ($cli in $sqlodbc)
     {