New-Volume
Creates a volume with the specified file system.
Syntax
New-Volume
[-StoragePoolFriendlyName] <String[]>
-FriendlyName <String>
[-Size <UInt64>]
-FileSystem <FileSystem>
[-AccessPath <String>]
[-ResiliencySettingName <String>]
[-ProvisioningType <ProvisioningType>]
[-PhysicalDiskRedundancy <UInt16>]
[-NumberOfColumns <UInt16>]
[-StorageTiers <CimInstance[]>]
[-StorageTierSizes <UInt64[]>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
New-Volume
-StoragePoolUniqueId <String[]>
-FriendlyName <String>
[-Size <UInt64>]
-FileSystem <FileSystem>
[-AccessPath <String>]
[-ResiliencySettingName <String>]
[-ProvisioningType <ProvisioningType>]
[-PhysicalDiskRedundancy <UInt16>]
[-NumberOfColumns <UInt16>]
[-StorageTiers <CimInstance[]>]
[-StorageTierSizes <UInt64[]>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
New-Volume
-StoragePoolName <String[]>
-FriendlyName <String>
[-Size <UInt64>]
-FileSystem <FileSystem>
[-AccessPath <String>]
[-ResiliencySettingName <String>]
[-ProvisioningType <ProvisioningType>]
[-PhysicalDiskRedundancy <UInt16>]
[-NumberOfColumns <UInt16>]
[-StorageTiers <CimInstance[]>]
[-StorageTierSizes <UInt64[]>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
New-Volume
-InputObject <CimInstance[]>
-FriendlyName <String>
[-Size <UInt64>]
-FileSystem <FileSystem>
[-AccessPath <String>]
[-ResiliencySettingName <String>]
[-ProvisioningType <ProvisioningType>]
[-PhysicalDiskRedundancy <UInt16>]
[-NumberOfColumns <UInt16>]
[-StorageTiers <CimInstance[]>]
[-StorageTierSizes <UInt64[]>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
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).
Examples
Example 1: Create a volume on a mirror space
PS C:\> New-Volume -StoragePoolName "CompanyData" -FriendlyName "TestVolume" -Size 10GB -ResiliencySettingName "Mirror" -FileSystem NTFS -AccessPath "M: "-ProvisioningType Fixed
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.
Example 2: Create a volume on a new tiered storage space
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
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.
Parameters
-AccessPath
Specifies a drive letter or a mount point to assign to the volume.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
ps_cimcommon_asjob
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.
Type: | CimSession[] |
Aliases: | Session |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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
Type: | FileSystem |
Accepted values: | NTFS, ReFS, CSVFS_NTFS, CSVFS_ReFS |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FriendlyName
Specifies a friendly name. The cmdlet creates the volume with this name.
Type: | String |
Aliases: | VolumeFriendlyName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.
Type: | CimInstance[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NumberOfColumns
Specifies the number of columns to create on the virtual disk.
Type: | UInt16 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PhysicalDiskRedundancy
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)..
Type: | UInt16 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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.
Type: | ProvisioningType |
Accepted values: | Unknown, Thin, Fixed |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResiliencySettingName
Specifies the name of the desired resiliency setting, for example, Simple, Mirror, or Parity.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Size
Specifies the size of the volume to create.
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StoragePoolFriendlyName
Specifies an array of storage pool friendly names. The cmdlet creates the volume in the storage pools you specify.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StoragePoolName
Specifies an array of storage pool names. The cmdlet creates the volume in the storage pools you specify.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StoragePoolUniqueId
Specifies an array of unique IDs, as strings. The cmdlet creates the volume in the storage pools you specify.
Type: | String[] |
Aliases: | StoragePoolId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageTiers
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.
Type: | CimInstance[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageTierSizes
Specifies an array of storage tier sizes. The cmdlet creates the virtual disk for the volume with the storage tier sizes you specify.
Type: | UInt64[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ThrottleLimit
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.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
You can use the pipeline operator to pass an MSFT_StoragePool object to the InputObject parameter.
Outputs
This cmdlet outputs an object that represents the newly created 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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for