PowerShell Logo Small

New-StoragePool



This is the built-in help made by Microsoft for the command 'New-StoragePool', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

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] <String[]> [-AsJob] [-AutoWriteCacheSize <Boolean>] [-CimSession <CimSession[]>] [-EnclosureAwareDefault <Boolean>]
[-LogicalSectorSizeDefault <UInt64>] [-OtherUsageDescription <String>] [-ProvisioningTypeDefault <ProvisioningType>] [-ResiliencySettingNameDefault <String>] [-ThrottleLimit
<Int32>] [-Usage <Usage>] [-WriteCacheSizeDefault <UInt64>] -FriendlyName <String> -PhysicalDisks <CimInstance[]> [<CommonParameters>]
New-StoragePool [-AsJob] [-AutoWriteCacheSize <Boolean>] [-CimSession <CimSession[]>] [-EnclosureAwareDefault <Boolean>] [-LogicalSectorSizeDefault <UInt64>]
[-OtherUsageDescription <String>] [-ProvisioningTypeDefault <ProvisioningType>] [-ResiliencySettingNameDefault <String>] [-ThrottleLimit <Int32>] [-Usage <Usage>]
[-WriteCacheSizeDefault <UInt64>] -FriendlyName <String> -PhysicalDisks <CimInstance[]> -StorageSubSystemUniqueId <String[]> [<CommonParameters>]
New-StoragePool [-AsJob] [-AutoWriteCacheSize <Boolean>] [-CimSession <CimSession[]>] [-EnclosureAwareDefault <Boolean>] [-LogicalSectorSizeDefault <UInt64>]
[-OtherUsageDescription <String>] [-ProvisioningTypeDefault <ProvisioningType>] [-ResiliencySettingNameDefault <String>] [-ThrottleLimit <Int32>] [-Usage <Usage>]
[-WriteCacheSizeDefault <UInt64>] -FriendlyName <String> -InputObject <CimInstance[]> -PhysicalDisks <CimInstance[]> [<CommonParameters>]
New-StoragePool [-AsJob] [-AutoWriteCacheSize <Boolean>] [-CimSession <CimSession[]>] [-EnclosureAwareDefault <Boolean>] [-LogicalSectorSizeDefault <UInt64>]
[-OtherUsageDescription <String>] [-ProvisioningTypeDefault <ProvisioningType>] [-ResiliencySettingNameDefault <String>] [-ThrottleLimit <Int32>] [-Usage <Usage>]
[-WriteCacheSizeDefault <UInt64>] -FriendlyName <String> -PhysicalDisks <CimInstance[]> -StorageSubSystemName <String[]> [<CommonParameters>]



Search powershellhelp.space

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.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=307005
Get-PhysicalDisk
Get-StoragePool
Get-StorageSubsystem
New-Volume
Remove-StoragePool
Set-StoragePool

REMARKS

<

Examples


Example 1: Create a new storage pool using Storage Spaces

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



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.




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

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



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




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

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



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.