Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sorry for the flash back to the Mickey Mouse Club, but it sticks.
Quick Challenge on comparing hot fixes (QFEs) applied to a server farm to determine which ones are needed across all of the servers. There are a few options like Microsoft Baseline Security Analyzer, PowerShell, VBScript calling WMI, C#, C++, etc. However, in comes 2 tools that may may your life a little easier.
- WMIC
- “The WMI command-line (WMIC) utility provides a command-line interface for WMI. WMIC is compatible with existing shells and utility commands. “
- https://msdn.microsoft.com/en-us/library/aa394531.aspx
- Microsoft Excel
- For Pivot Table goodness
What the whosie what’s it sauce? Yes, WMIC and Excel. In just 1 line of WMIC and then an import into Excel plus a Pivot Table, you can see which QFEs, SP, etc are applied to the servers in your farm.
Description
- ServerWFE1, ServerApp and ServerSQL make up your SharePoint Farm.
- You have admin permissions on all servers (or can at least run at that level, or have permission to read the WMI classes)
- From a command prompt on a machine that has connectivity (please see the link from WMIC for all the details).
- WMIC /NODE:”ServerWFE1”,”ServerApp”, “ServerSQL” /OUTPUT:c:\qfe.csv QFE LIST FULL /FORMAT:csv
- follow the steps in the Example to get into a Pivot Table!
Example
- I ran the following command on my local machine
- WMIC /NODE:"tadd1" /OUTPUT:c:\qfe.csv QFE LIST FULL /FORMAT:csv
- Opened Excel
- Opened the c:\qfe.csv file
- started at row 2
- comma separated
- Select the worksheet
- Insert Pivot Table
- Row
- drag HotFixID
- Column
- drag Node
- Values
- drag HotFixID
- use count
- drag HotFixID
- Row
- If you have more than one node, you will see a quick table that if count is 1, great, if blank out of synch!
PivotTable Sample
| Count of HotFixID | Column Labels | ||
| Row Labels | TADD1 | TADD2 | Grand Total |
| KB958690 | 1 | 1 | |
| KB961367 | 1 | 1 | 2 |
| KB962236 | 1 | 1 | |
| KB962921 | 1 | 1 | |
| KB963660 | 1 | 1 | 2 |
| KB967062 | 1 | 1 | |
| KB967355 | 1 | 1 | 2 |
| KB967492 | 1 | 1 | |
| KB967540 | 1 | 1 | 2 |
| KB968004 | 1 | 1 | 2 |
| KBWUClient-SelfUpdate-Aux | 1 | 1 | |
| KBWUClient-SelfUpdate-Core | 1 | 1 | |
| Grand Total | 12 | 5 | 17 |
You can also apply an xml style sheet, hint hint, to highlight those that are bad. Or, use conditional formatting from Excel.
Peace
Comments
- Anonymous
April 01, 2009
PingBack from http://peace.linkablez.info/2009/04/01/wmic-key-mousharepoint/