Monthly Archives: December 2010

Using PowerShell With A Failover Cluster

You must import the FailoverClusters module to use the cluster commandlets in PowerShell.  Open PowerShell then type: Import-Module FailoverClusters

Removing A Failed Disk Resource From A Failover Cluster

Two virtual disks failed on the storage used by our Windows Server 2008 R2 Hyper-V cluster.  I wasn’t able to recover the virtual disks, so I needed to remove them from the cluster.  I had to use a different method for each disk. 

The cluster uses Cluster Shared Volumes, so using Failover Cluster Manager, I opened Cluster Shared Volumes, right-clicked on the first disk and selected “Remove from Cluster Shared Volumes” (This option was only available when the cluster was attempting to bring the disk online).  The disk was then listed as Failed under Available Storage, in the Storage section of Failover Cluster Manager.  I was then able to right-click on the disk and select Delete.

The second disk was continuously listed as Failed in Cluster Shared Volumes, so I wasn’t able to select the “Remove from Cluster Shared Volumes” option.  I had to remove this disk from Cluster Shared Volumes using PowerShell.  I opened PowerShell, and imported the Failover Cluster module into PowerShell by typing Import-Module FailoverClusters .  Next, I typed Remove-ClusterSharedVolume “Cluster Disk 4” to remove the failed disk from Cluster Shared Volumes.  The disk was then listed as Failed under Available Storage, in the Storage section of Failover Cluster Manager.  I then typed Remove-ClusterResource “Cluster Disk 4” to remove the disk from the cluster.

Retrieve Graphics Adapter Info Using VBScript

I needed to upgrade the graphics driver on one model of our desktop PCs.  Below is an example script you can use to retrieve the display adapter description and driver version using VBScript.

 

Set objWMIService = GetObject(“winmgmts:\\.\root\cimv2”)

Set colItems = objWMIService.ExecQuery(“Select * from Win32_VideoController”)

For Each objItem in colItems

Wscript.Echo “Display Adapter Description: ” & objItem.Description

Wscript.Echo “Driver Version: ” & objItem.DriverVersion

Next
Set colItems = Nothing

Set objWMIService = Nothing