Get-DbaWsfcAvailableDisk
View SourceSynopsis
Retrieves shared storage disks available for clustering but not yet assigned to a Windows Server Failover Cluster.
Description
Identifies shared storage disks that are visible to all cluster nodes and eligible for clustering, but have not yet been added to the cluster’s storage pool. This is essential when planning to expand SQL Server Failover Cluster Instances (FCIs) or troubleshooting storage connectivity issues. The function queries each cluster node to ensure disks are properly accessible across the entire cluster before attempting to add them as cluster resources.
All Windows Server Failover Clustering (Wsfc) commands require local admin on each member node.
Syntax
Get-DbaWsfcAvailableDisk
[[-ComputerName] <DbaInstanceParameter[]>]
[[-Credential] <PSCredential>]
[-EnableException]
[<CommonParameters>]
Examples
Example: 1
PS C:\> Get-DbaWsfcAvailableDisk -ComputerName cluster01
Gets available disks from the failover cluster cluster01
Optional Parameters
-ComputerName
Specifies the Windows Server Failover Cluster name or any cluster node name to query for available disks.
Use this when you need to check shared storage from a specific cluster, especially when managing multiple clusters or troubleshooting storage visibility across cluster nodes.
Accepts multiple values to query several clusters simultaneously.
| Property | Value |
|---|---|
| Alias | |
| Required | False |
| Pipeline | true (ByValue) |
| Default Value | $env:COMPUTERNAME |
-Credential
Allows you to login to the cluster using alternative credentials.
| Property | Value |
|---|---|
| Alias | |
| Required | False |
| Pipeline | false |
| Default Value |
-EnableException
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with “sea of red” exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this “nice by default” feature off and enables you to catch exceptions with your own try/catch.
| Property | Value |
|---|---|
| Alias | |
| Required | False |
| Pipeline | false |
| Default Value | False |
Outputs
Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_AvailableDisk
Returns one object per available disk that can be added to the cluster. The disk must be visible to all cluster nodes to be considered available.
All properties from the MSCluster_AvailableDisk WMI class are returned, including:
Properties added via Add-Member:
- State: Current operational state of the disk
- ClusterName: Name of the cluster
- ClusterFqdn: Fully qualified domain name of the cluster
Standard WMI properties from MSCluster_AvailableDisk:
- Name: Label or designation of the disk
- Id: Unique disk identifier (GUID for virtual disks, GptGuid or Signature for physical disks)
- Size: Physical disk capacity in bytes
- Number: Disk number as seen on the host node
- Status: Operational status (OK, Degraded, Error, etc.)
- ConnectedNodes: Array of cluster node names that can access the disk
- Signature: MBR disk signature value
- GptGuid: GUID for GPT-partitioned disks
- ScsiPort: SCSI port number
- ScsiBus: SCSI bus identifier
- ScsiTargetID: SCSI target identification number
- ScsiLUN: SCSI logical unit number
- Node: Name of the node providing the disk information
- ResourceName: Resource name when adding disk to cluster All properties from the base WMI object are accessible; the function returns the complete object without filtering.
dbatools