Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

New-StoragePool

New-StoragePool

storagesubsystem.cdxml

Synopsis

Creates a new storage pool using a group of physical disks, and a specific storage subsystem exposed by a storage provider.

Syntax

New-StoragePool [-StorageSubSystemFriendlyName] [-AsJob] [-AutoWriteCacheSize] [-CimSession] [-EnclosureAwareDefault] [-LogicalSectorSizeDefault] [-OtherUsageDescription] [-ProvisioningTypeDefault] [-ResiliencySettingNameDefault] [-ThrottleLimit] [-Usage] [-WriteCacheSizeDefault] [-FriendlyName] [-PhysicalDisks] [<CommonParameters>]

New-StoragePool [-AsJob] [-AutoWriteCacheSize] [-CimSession] [-EnclosureAwareDefault] [-LogicalSectorSizeDefault] [-OtherUsageDescription] [-ProvisioningTypeDefault] [-ResiliencySettingNameDefault] [-ThrottleLimit] [-Usage] [-WriteCacheSizeDefault] [-FriendlyName] [-PhysicalDisks] [-StorageSubSystemUniqueId] [<CommonParameters>]

New-StoragePool [-AsJob] [-AutoWriteCacheSize] [-CimSession] [-EnclosureAwareDefault] [-LogicalSectorSizeDefault] [-OtherUsageDescription] [-ProvisioningTypeDefault] [-ResiliencySettingNameDefault] [-ThrottleLimit] [-Usage] [-WriteCacheSizeDefault] [-FriendlyName] [-InputObject] [-PhysicalDisks] [<CommonParameters>]

New-StoragePool [-AsJob] [-AutoWriteCacheSize] [-CimSession] [-EnclosureAwareDefault] [-LogicalSectorSizeDefault] [-OtherUsageDescription] [-ProvisioningTypeDefault] [-ResiliencySettingNameDefault] [-ThrottleLimit] [-Usage] [-WriteCacheSizeDefault] [-FriendlyName] [-PhysicalDisks] [-StorageSubSystemName] [<CommonParameters>]

Detailed Description

The New-StoragePool cmdlet creates a new storage pool using a group of physical disks, and a specific storage subsystem exposed by a storage provider.

Parameters

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-AutoWriteCacheSize <Boolean>

Indicates whether to set the size of the write-back cache to 1 GB for all types of storage spaces, which include simple, mirror, and parity, to create from the pool. If the number or size of the solid-state drives (SSDs) or journal disks in the storage pool is not sufficient and you specify a value of $True for this parameter, the cmdlet sets the write-back cache size to 0 for simple and mirror spaces, and to 32 MB for parity spaces.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-CimSession <CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

Session

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-EnclosureAwareDefault <Boolean>

Specifies the default allocation policy for virtual disks created in an enclosure-aware storage pool. For example, an enclosure-aware subsystem could balance each data copy of the virtual disk across multiple physical enclosures such that each enclosure contains a full data copy of the virtual disk.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-FriendlyName <String>

Specifies a friendly name for the storage pool to be created. The friendly name may be defined by a user and is not guaranteed to be unique.

Aliases

StoragePoolFriendlyName

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-InputObject <CimInstance[]>

Accepts an object from the pipeline as input.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-LogicalSectorSizeDefault <UInt64>

Specifies the default logical sector size to use for virtual disks created in this pool. Valid logical sector size values (in bytes) for virtual disks created by using the Storage Spaces subsystem are 512 and 4096.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-OtherUsageDescription <String>

Specifies the usage description for the storage pool.

Aliases

StoragePoolOtherUsageDescription

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PhysicalDisks <CimInstance[]>

Accepts one or more PhysicalDisk objects as input. The Physical Disk CIM objects represent the physical disks to be added to the storage pool.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ProvisioningTypeDefault <ProvisioningType>

Specifies the default type of provisioning for virtual disks created in this pool. The acceptable values for this parameter are:  Unknown, Fixed or Thin.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ResiliencySettingNameDefault <String>

Specifies the default resiliency setting name for virtual disks created in this pool.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-StorageSubSystemFriendlyName <String[]>

Specifies the friendly name of the storage subsystem on which you want to create the storage pool.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-StorageSubSystemName <String[]>

Specifies the name of the storage subsystem (provided by the Storage Management) on which you want to create the storage pool.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-StorageSubSystemUniqueId <String[]>

Specifies the ID of the storage subsystem on which you want to create the storage pool

Aliases

StorageSubsystemId

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-ThrottleLimit <Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Usage <Usage>

Specifies the usage setting for the storage pool. The acceptable values for this parameter are: Other, ReservedAsDeltaReplicaContainer, ReservedForComputerSystem, ReservedForLocalReplicationServices, ReservedForMigrationServices, ReservedForRemoteReplicationServices, ReservedForSparing, and Unrestricted.

Aliases

StoragePoolUsage

Required?

false

Position

named

Default value

Other

Accept pipeline input?

false

Accept wildcard characters?

false

-WriteCacheSizeDefault <UInt64>

Specifies the default write-back cache size for virtual disks in the storage pool.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

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

Return Type

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

Notes

None

Examples

Example 1: Create a new storage pool using Storage Spaces

This example creates a new storage pool named CompanyData using the Storage Spaces subsytem, using the minimum parameters, and assuming that there are no other storage subsystems attached to the computer that have available disks.

This line uses the Get-PhysicalDisk cmdlet to get all PhysicalDisk objects than are not yet in a (concrete) storage pool, and assigns the array of objects to the $PhysicalDisks variable.
PS C:\> $PhysicalDisks = (Get-PhysicalDisk -CanPool $True)

This line creates a new storage pool using the $PhysicalDisks variable to specify the disks to include from the Storage Spaces subsystem (specified with a wildcard * to remove the need to modify the friendly name for different computers).
PS C:\> New-StoragePool -FriendlyName CompanyData -StorageSubsystemFriendlyName "Storage Spaces*" -PhysicalDisks $PhysicalDisks

Example 2: Create a new pool and set defaults for virtual disks

This example creates a new storage pool named CompanyData using the Storage Spaces subsystem and sets default values for virtual disk creation.

PS C:\> $PhysicalDisks = (Get-PhysicalDisk -CanPool $True)
PS C:\> New-StoragePool -FriendlyName CompanyData -StorageSubsystemFriendlyName "Storage Spaces*" -PhysicalDisks $PhysicalDisks -ResiliencySettingNameDefault Mirror -ProvisioningTypeDefault Thin –Verbose

Example 3: Create a new storage pool, virtual disk, partition, and volume

This example creates a new storage pool, and then makes use of the pipeline to create a new virtual disk in the pool, initialize the disk, create a new partition on the disk, and then format the new partition (volume). Alternatively you can use the New-Volume cmdlet to achieve a similar result in a single command.

The first line ($PhysicalDisks =…) gets the storage subsystem object for the Storage Spaces subsystem, passes it to the Get-PhysicalDisk cmdlet, which then gets the physical disks in the specified subsystem that are available to add to a storage pool, and assigns these disks to the $PhysicalDisks variable.The second line of the command has five parts, connected by the pipeline (|). The first part (New-StoragePool…) creates a new storage pool using the physical disks in the $PhysicalDisks variable, and then passes the new storage pool down the pipeline. All of the following commands are logically part of one command and should be entered as such.The second part (New-VirtualDisk…) creates a new virtual disk on the passed in storage pool and then passes the new virtual disk down the pipeline.The third part (Initialize-Disk…) initializes the disk that was passed in, and then passes the disk down the pipeline.The fourth part (New-Partition…) creates a new partition on the disk that was passed in, assigns it the next available drive letter, and then passes the partition down the pipeline.The final part of the command (Format-Volume) formats the partition that was passed in.
PS C:\> $PhysicalDisks = Get-StorageSubSystem -FriendlyName "Storage Spaces*" | Get-PhysicalDisk -CanPool $True 
PS C:\> New-StoragePool -FriendlyName "CompanyData" -StorageSubsystemFriendlyName "Storage Spaces*" -PhysicalDisks $PhysicalDisks |New-VirtualDisk -FriendlyName "UserData" -Size 100GB -ProvisioningType Thin |Initialize-Disk -PassThru |New-Partition -AssignDriveLetter -UseMaximumSize |Format-Volume

Online Version
Get-PhysicalDisk
Get-StoragePool
Get-StorageSubsystem
New-Volume
Remove-StoragePool
Set-StoragePool