-1

我正在将带有 wmi 的修补程序列表拉入排序列表。然后我将集群修复放在另一个从http://support.microsoft.com/kb/2545685构建的列表中

Dim p_Windows2008R2sp1ClusterFixes As New sortedList
p_Windows2008R2sp1ClusterFixes("2525380") = ""
p_Windows2008R2sp1ClusterFixes("2446607") = ""
p_Windows2008R2sp1ClusterFixes("2531907") = ""
p_Windows2008R2sp1ClusterFixes("2550886") = ""
p_Windows2008R2sp1ClusterFixes("2552040") = ""
p_Windows2008R2sp1ClusterFixes("2520235") = ""
p_Windows2008R2sp1ClusterFixes("2494162") = ""
p_Windows2008R2sp1ClusterFixes("2524478") = ""
p_Windows2008R2sp1ClusterFixes("2494162") = ""

Dim hotfixArray As String() = {981391, 981392, 977236, 981111, 977238, 977239 }
For i As Integer = 0 To hotfixArray.Length - 1
          slMissingList(hotfixArray(i)) = hotfixArray(i)
Next

我希望能够进行内部连接以查看安装了哪些修复程序,并使用 linq 进行左外连接以告诉我未安装哪些修复程序。1 到 16 台机器上有数百个修复程序。我需要能够查看每台机器的修复程序。

4

1 回答 1

0

你要找的东西可以用Where. 从您的问题中很难判断哪个列表包含什么,但它看起来像:

   Dim available As New SortedList(Of string,string)
   Dim installed As New SortedList(Of string,string)

   Dim availableInstalled = available.Where( Function(a) installed.ContainsKey(a.Key))
   Dim missing = available.Where( Function(a) Not installed.ContainsKey(a.Key))
于 2013-08-14T19:12:28.180 回答