Configuring Cluster Shared Volumes and Clustered Virtual Machines by Using Windows PowerShell
Updated: October 1, 2009
Applies To: Windows Server 2008 R2
This topic lists common tasks related to configuring Cluster Shared Volumes and clustered virtual machines on a failover cluster running Windows Server 2008 R2, and shows example Windows PowerShell commands for performing those tasks. The Windows PowerShell cmdlets provide an alternative interface for actions that you might otherwise perform with command-line commands or the Failover Cluster Manager snap-in. For topics that list other common tasks and the corresponding Windows PowerShell commands, see Performing Common Tasks in a Failover Cluster by Using Windows PowerShell.
For more information about how to use Windows PowerShell, see Additional references, later in this topic.
Common tasks and example commands for working with Cluster Shared Volumes
This section lists common tasks for working with Cluster Shared Volumes, and the example Windows PowerShell commands for performing those tasks. Also see Common tasks and example commands for working with clustered virtual machines, later in this topic.
Note
This topic includes commands for failover cluster disks that are in Cluster Shared Volumes. For information about commands for other disks in a failover cluster, see Configuring Existing Failover Cluster Disks by Using Windows PowerShell.
Task | PowerShell command |
---|---|
Review the status of Cluster Shared Volumes. |
For more information, see Get-ClusterSharedVolume (https://go.microsoft.com/fwlink/?LinkId=143797). |
Review properties of a Cluster Shared Volume. |
Where Or:
Where For more information, see:
|
Turn maintenance for a disk on and off. |
Where Or:
Where For more information, see:
|
Run "chkdsk /f" on a Cluster Shared Volume. (Runs on the local node.) |
Where For more information, see Repair-ClusterSharedVolume (https://go.microsoft.com/fwlink/?LinkId=143812). |
Run "defrag" on a Cluster Shared Volume. (Runs on the local node.) |
Where For more information, see Repair-ClusterSharedVolume (https://go.microsoft.com/fwlink/?LinkId=143812). |
Move a Cluster Shared Volume to a different node. |
Where For more information, see Move-ClusterSharedVolume (https://go.microsoft.com/fwlink/?LinkId=143801). |
Common tasks and example commands for working with clustered virtual machines
This section lists common tasks for working with clustered virtual machines, and the example Windows PowerShell commands for performing those tasks. Also see Common tasks and example commands for working with Cluster Shared Volumes, earlier in this topic.
Task | PowerShell command |
---|---|
Review status of clustered virtual machines. |
For more information, see:
|
Review resources in a clustered virtual machine. |
Where For more information, see:
|
Live migrate a clustered virtual machine. (This also tests failover.) |
Where For more information, see Move-ClusterVirtualMachineRole (https://go.microsoft.com/fwlink/?LinkId=143802). |
Quick migrate a clustered virtual machine. (This also tests failover.) |
Where For more information, see Move-ClusterGroup (https://go.microsoft.com/fwlink/?LinkId=143799). Also see the next item for information about OfflineAction. |
Review OfflineAction settings for clustered virtual machines. |
The OfflineAction setting affects the action the cluster takes when you move the clustered virtual machine from one node to another. The default for OfflineAction is 1, which saves the state of the virtual machine. For more information, see:
|
Refresh a clustered virtual machine configuration. |
Where For more information, see Update-ClusterVirtualMachineConfiguration (https://go.microsoft.com/fwlink/?LinkId=143833). |