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-Volume

New-Volume

storagepool.cdxml

Synopsis

Creates a volume with the specified file system.

Syntax

New-Volume [-StoragePoolFriendlyName] [-AccessPath] [-AsJob] [-CimSession] [-NumberOfColumns] [-PhysicalDiskRedundancy] [-ProvisioningType] [-ResiliencySettingName] [-Size] [-StorageTiers] [-StorageTierSizes] [-ThrottleLimit] [-FileSystem] [-FriendlyName] [<CommonParameters>]

New-Volume [-AccessPath] [-AsJob] [-CimSession] [-NumberOfColumns] [-PhysicalDiskRedundancy] [-ProvisioningType] [-ResiliencySettingName] [-Size] [-StorageTiers] [-StorageTierSizes] [-ThrottleLimit] [-FileSystem] [-FriendlyName] [-StoragePoolUniqueId] [<CommonParameters>]

New-Volume [-AccessPath] [-AsJob] [-CimSession] [-NumberOfColumns] [-PhysicalDiskRedundancy] [-ProvisioningType] [-ResiliencySettingName] [-Size] [-StorageTiers] [-StorageTierSizes] [-ThrottleLimit] [-FileSystem] [-FriendlyName] [-StoragePoolName] [<CommonParameters>]

New-Volume [-AccessPath] [-AsJob] [-CimSession] [-NumberOfColumns] [-PhysicalDiskRedundancy] [-ProvisioningType] [-ResiliencySettingName] [-Size] [-StorageTiers] [-StorageTierSizes] [-ThrottleLimit] [-FileSystem] [-FriendlyName] [-InputObject] [<CommonParameters>]

Detailed Description

The New-Volume cmdlet creates a volume with the specified file system. The cmdlet manages the creation of the virtual disk with the specified size and resiliency setting, initializes the disk, creates a partition on it and formats the volume with the specified file system, including Cluster Shared Volumes (CSVs).

Parameters

-AccessPath <String>

Specifies a drive letter or a mount point to assign to the volume.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-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

-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

-FileSystem <FileSystem>

Specifies the file system to use for the volume. The cmdlet formats the volume with the file system you specify. The acceptable values for this parameter are:  -- NTFS -- ReFS -- CSVFS_NTFS -- CSVFS_ReFS

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-FriendlyName <String>

Specifies a friendly name. The cmdlet creates the volume with this name.

Aliases

VolumeFriendlyName

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-InputObject <CimInstance[]>

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-NumberOfColumns <UInt16>

Specifies the number of columns to create on the virtual disk.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PhysicalDiskRedundancy <UInt16>

Specifies the physical disk redundancy value to use during the creation of the virtual disk. This value represents how many failed physical disks the virtual disk can tolerate without data loss for two-way mirror spaces (1), three-way mirror spaces (2), single-parity spaces (1), and dual parity spaces (2)..

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ProvisioningType <ProvisioningType>

Specifies the type of provisioning. The acceptable values for this parameter are:  Fixed, or Thin. Storage spaces that use storage tiers or dual parity must use Fixed provisioning.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ResiliencySettingName <String>

Specifies the name of the desired resiliency setting, for example, Simple, Mirror, or Parity.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Size <UInt64>

Specifies the size of the volume to create.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-StoragePoolFriendlyName <String[]>

Specifies an array of storage pool friendly names. The cmdlet creates the volume in the storage pools you specify.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-StoragePoolName <String[]>

Specifies an array of storage pool names. The cmdlet creates the volume in the storage pools you specify.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-StoragePoolUniqueId <String[]>

Specifies an array of unique IDs, as strings. The cmdlet creates the volume in the storage pools you specify.

Aliases

StoragePoolId

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-StorageTiers <CimInstance[]>

Specifies an array of storage tiers. The cmdlet creates the virtual disk for the volume with the storage tiers you specify. To obtain a storage tier object, use the New-StorageTier cmdlet.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-StorageTierSizes <UInt64[]>

Specifies an array of storage tier sizes. The cmdlet creates the virtual disk for the volume with the storage tier sizes you specify.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

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

Input Type

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

Return Type

Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/Storage/MSFT_Volume

Notes

To create a volume on a new storage space with enclosure-awareness enabled (providing resiliency for an entire JBOD enclosure failure), use the Set-StoragePool cmdlet with the –EnclosureAwareDefault $true parameter to set the storage pool to create storage spaces with enclosure awareness enabled by default.

Examples

Example 1: Create a volume on a mirror space

This command creates a new storage space in the CompanyData pool using the Mirror resiliency setting and fixed provisioning, and then formats the volume with the NTFS file system and assigns drive letter M.

PS C:\> New-Volume -StoragePoolName "CompanyData" -FriendlyName "TestVolume" -Size 10GB -ResiliencySettingName "Mirror" -FileSystem NTFS -AccessPath "M: "-ProvisioningType Fixed

Example 2: Create a volume on a new tiered storage space

This command creates new storage space in the CompanyData pool using the Mirror resiliency setting, fixed provisioning, a 20 GB SSD storage tier, and an 80 GB HDD storage tier, and then formats the volume with the NTFS file system and assigns drive letter M.

PS C:\>New-Volume -StoragePoolFriendlyName "CompanyData" -FriendlyName "UserData" -AccessPath "M:" -ResiliencySettingName "Mirror" -ProvisioningType "Fixed" -StorageTiers (Get-StorageTier -FriendlyName "*SSD*"), (Get-StorageTier -FriendlyName "*HDD*") -StorageTierSizes 20GB, 80GB -FileSystem NTFS

Online Version