Test-SpacesConfiguration

Test-SpacesConfiguration

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

语法

Parameter Set: ByName
Test-SpacesConfiguration [-StoragePoolFriendlyName] <String> [[-Passthru]] [ <CommonParameters>]

Parameter Set: ByPool
Test-SpacesConfiguration [-StoragePool] <CimInstance> [[-Passthru]] [ <CommonParameters>]

详细说明

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

参数

-Passthru

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

别名

是否为必需?

false

位置?

2

默认值

是否接受管道输入?

false

是否接受通配符?

false

-StoragePool<CimInstance>

Specifies the StoragePool object to test.

别名

是否为必需?

true

位置?

1

默认值

是否接受管道输入?

false

是否接受通配符?

false

-StoragePoolFriendlyName<String>

Specifies the friendly name of the storage pool to test.

别名

是否为必需?

true

位置?

1

默认值

是否接受管道输入?

false

是否接受通配符?

true

<CommonParameters>

此 cmdlet 支持通用参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

输入

输入类型是指可通过管道传送给 cmdlet 的对象的类型。

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

    You can pipe a StoragePool object to the StoragePool parameter.

输出

输出类型是 cmdlet 所发出对象的类型。

  • System.Boolean

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

  • 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.

示例

Example 1 – Test a storage pool

This example tests a storage pool.

PS C:\> Test-SpacesConfiguration -StoragePoolFriendlyName Internal

Example 2 – Test a storage pool with verbose output

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

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