search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Windows Powershell, Windows Server | No Comment | 1,820 views | 20/09/2013 10:40

This is my cluster checklist script to verify many different components like Windows Updates, Hotfixes, 3Par installation, Driver information etc.

1
2
3
4
5
6
7
8
9
10
# Lets get our master Cluster Node, thats one of the most updated Cluster Node
$MasterNode = ((Get-Cluster | Get-ClusterNode | Select Name,@{label="HotFixes";expression={(Get-Hotfix -ComputerName $_.Name).HotFixID.Count}} | Sort HotFixes -Descending)[0]).Name
 
# Get Master Hotfix KBs and put them in a array
$MasterHotfixes = @((Get-Hotfix -ComputerName $MasterNode).HotFixID)
 
# Now we will use that master hotfixes to compare with others
$ClusterResults = (Get-Cluster | Get-ClusterNode | Select Name,@{label="HP WBEM";expression={$ServerName = $_.Name; $TestWBEM = (Get-Item "\\$ServerName\C$\Program Files\HPWBEM\Tools\HPWbemTestEvent.exe").Exists; if ($TestWBEM -eq $True) { $TestWBEM = "True"; $TestWBEM; } else { $TestWBEM = "False"; $TestWBEM; }}},@{label="3PAR Info";expression={$ServerName = $_.Name; $Test3PAR = (Get-Item "\\$ServerName\C$\Program Files (x86)\3PAR\HP 3PARInfo\HP3PARInfo.exe").Exists; if ($Test3PAR -eq $True) { $Test3PAR = "True"; $Test3PAR; } else { $Test3PAR = "False"; $Test3PAR; }}},@{label="QLogic Driver";expression={$ServerName = $_.Name; (Get-Item \\$ServerName\C$\Windows\System32\Drivers\ql2300.sys).VersionInfo.ProductVersion}},@{label="HP SATA Driver";expression={$ServerName = $_.Name; (Get-Item \\$ServerName\C$\Windows\System32\Drivers\HPCISSs2.sys).VersionInfo.ProductVersion}},@{label="Total Hotfixes";expression={(Get-Hotfix -ComputerName $_.Name).HotFixID.Count}},@{label="Missing Hotfixes";expression={$Hotfixes = @((Get-Hotfix -ComputerName $_.Name).HotFixID); $MissingHotfixes = (Compare-Object -ReferenceObject $MasterHotfixes -DifferenceObject $Hotfixes).InputObject; if ($MissingHotfixes) { $MissingHotfixes } else { $MissingHotfixes = "No missing updates"; $MissingHotfixes } }} | Sort Name)
 
$ClusterResults

I hope it also helps you.