New-SpacesPool

New-SpacesPool

Creates a storage pool on the Storage Spaces subsystem.

Syntaxe

Parameter Set: ByDiskArray
New-SpacesPool [-FriendlyName] <String> [-PhysicalDisks] <Object[]> [[-NumberOfHotsparesToUse] <Int32> ] [ <CommonParameters>]

Parameter Set: ByLocalStorage
New-SpacesPool [-FriendlyName] <String> [-NumberofPhysicalDiskstoUse] <Int32> [[-NumberOfHotsparesToUse] <Int32> ] [ <CommonParameters>]

Description détaillée

The New-SpacesPool cmdlet creates a storage pool on the Storage Spaces subsystem with three or more eligible physical disks. The storage pool can then be used to create storage spaces.

Paramètres

-FriendlyName<String>

Specifies the friendly name of the storage pool to create.

Alias

none

Obligatoire ?

true

Position ?

1

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-NumberOfHotsparesToUse<Int32>

Specifies how many physical disks to designate as hot spares, which are available to automatically replace failed disks.

Alias

none

Obligatoire ?

false

Position ?

3

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-NumberofPhysicalDiskstoUse<Int32>

Specifies how many physical disks to use to create the storage pool.

Alias

none

Obligatoire ?

true

Position ?

2

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-PhysicalDisks<Object[]>

Specifies the PhysicalDisk objects to use to create the storage pool.

Alias

none

Obligatoire ?

true

Position ?

2

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByValue, ByPropertyName)

Accepter les caractères génériques ?

false

<CommonParameters>

Cette applet de commande prend en charge les paramètres courants : -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer et -OutVariable. Pour plus d’informations, consultez about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entrées

Le type d’entrée correspond au type des objets que vous pouvez transmettre à l’applet de commande.

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

    You can pipe an array of PhysicalDisk objects to the PhysicalDisks parameter.

Sorties

Le type de sortie est le type des objets émis par l’applet de commande.

  • Microsoft.Management.Infrastructure.CimInstance#root/microsoft/windows/storage/MSFT_StoragePool

    This cmdlet outputs a StoragePool object.

Exemples

Example 1 – Create a storage pool with five physical disks

This example creates a storage pool named MyPool using five available physical disks from the Available Disks (primordial) storage pool.

PS C:\> New-SpacesPool -FriendlyName MyPool -NumberOfPhysicalDisksToUse 5

Example 2 – Create a storage pool with an array of PhysicalDisk objects

This example creates a storage pool named MyPool using the specified array of PhysicalDisk objects.

PS C:\> New-SpacesPool -FriendlyName MyPool -PhysicalDisks $DiskArray

Example 3 – Create a storage pool with two hot spares

This example creates a storage pool named MyPool using eight physical disks and assigns two physical disks to the pool for use as hot-spares in the event of a physical disk failure.

PS C:\> New-SpacesPool -FriendlyName MyPool -NumberofPhysicalDisksToUse 8 -NumberOfHotsparesToUse 2