Test-SpacesConfiguration

Tests for unhealthy resources associated with a Storage Spaces storage pool.

Syntax

Test-SpacesConfiguration
    [-StoragePool] <CimInstance>
    [-Passthru]
Test-SpacesConfiguration
    [-StoragePoolFriendlyName] <String>
    [-Passthru]

Description

The Test-SpacesConfiguration cmdlet tests for unhealthy Storage Spaces resources. It performs the following operations, and returns a True code if Storage Spaces is healthy:

Enumerate storage pools that unhealthy

Enumerate storage spaces that are unhealthy

Enumerate physical disks that are unhealthy

Examples

Example 1 - Test a storage pool

PS C:\>Test-SpacesConfiguration -StoragePoolFriendlyName Internal
This Storage Pool, the Storage Spaces created from this pool, and the Physical Disks in the Storage Pool are all currently healthy. 
True

This example tests a storage pool.

Example 2 - Test a storage pool with verbose output

PS C:\>Test-SpacesConfiguration -StoragePoolFriendlyName Internal -Verbose

This example tests a storage pool and specifies for verbose output.

Required Parameters

-StoragePool

Specifies the StoragePool object to test.

Type:CimInstance
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StoragePoolFriendlyName

Specifies the friendly name of the storage pool to test.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:True

Optional Parameters

-Passthru

Specifies that if the storage pool is unhealthy, the cmdlet should output an object that represents the unhealthy pool.

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool

You can pipe a StoragePool object to the StoragePool parameter.

Outputs

System.Boolean

This cmdlet outputs a Boolean object that represents whether Storage Spaces is healthy (True) or unhealthy (False).

Outputs

System.Object

If you specify the Passthru parameter and the storage pool is unhealthy, this cmdlet outputs an object that represents the unhealthy storage pool.