3

As part of an automated SQL Server installation process, I'd like to programmatically check whether a Windows Failover Cluster has already been validated.

There are some ways to validate the cluster programmatically, such as the Powershell cmdlet Test-Cluster, but I haven't been able to find a way to check the validation status without re-running the validation process, which can be slow and for some tests requires taking disks offline.

Is there a way to check the validation status, such as a property that can be accessed through WMI, the registry, or a Powershell cmdlet?

James Lupolt
  • 644
  • 1
  • 7
  • 18

1 Answers1

3

If it were me, I'd want to see the cluster validation report. According to technet,

 To view the results of the tests after you close the wizard, choose
   one of the following:

 * Open the folder systemroot\Cluster\Reports (on a clustered server).


 * In the console tree, right-click the cluster, and then click View
   Validation Report. This displays the most recent validation report   
   for that cluster.
Ben Thul
  • 3,024
  • 17
  • 24
  • The question is about programmatically checking, although parsing the report is one option. Unfortunately this answer only provides information anyone who knew enough to ask the question would already know. – James Lupolt Jul 22 '14 at 19:38
  • So check that directory through powershell or whatever tool you'd like. Also, it's not a given that someone who knew that there was a cluster validation would necessarily know that the results are stored for posterity (or where they were located for that matter). But, to answer the question that you think you should have asked, there likely isn't a "this cluster is valid" flag that you can interrogate because the check is done at a point in time. Things can change that would invalidate that status. The report is as good as you can do. – Ben Thul Jul 22 '14 at 20:00
  • OK, fair point that mentioning the directory where the reports exist could be useful information. That said, the question is clearly about programmatic checking and the content you pasted from Technet is obviously about clicking in the GUI. We'll probably end up parsing the report for keywords like 'failure', since there doesn't seem to be another option. When I looked into this several years ago, the SQL installer appeared to function the same way, checking the directory for the existence of a report and (apparently) failing if no such report existed. – James Lupolt Jul 22 '14 at 21:08