This is the built-in help made by Microsoft for the command 'New-Partition', 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.
Creates a new partition on an existing Disk object.
New-Partition [-DiskNumber] <UInt32[]> [-Alignment <UInt32>] [-AsJob] [-AssignDriveLetter] [-CimSession <CimSession[]>] [-DriveLetter <Char>] [-GptType <String>] [-IsActive]
[-IsHidden] [-MbrType <MbrType>] [-Offset <UInt64>] [-Size <UInt64>] [-ThrottleLimit <Int32>] [-UseMaximumSize] [<CommonParameters>]
New-Partition [-Alignment <UInt32>] [-AsJob] [-AssignDriveLetter] [-CimSession <CimSession[]>] [-DriveLetter <Char>] [-GptType <String>] [-IsActive] [-IsHidden] [-MbrType
<MbrType>] [-Offset <UInt64>] [-Size <UInt64>] [-ThrottleLimit <Int32>] [-UseMaximumSize] -DiskId <String[]> [<CommonParameters>]
New-Partition [-Alignment <UInt32>] [-AsJob] [-AssignDriveLetter] [-CimSession <CimSession[]>] [-DriveLetter <Char>] [-GptType <String>] [-IsActive] [-IsHidden] [-MbrType
<MbrType>] [-Offset <UInt64>] [-Size <UInt64>] [-ThrottleLimit <Int32>] [-UseMaximumSize] -InputObject <CimInstance[]> [<CommonParameters>]
New-Partition [-Alignment <UInt32>] [-AsJob] [-AssignDriveLetter] [-CimSession <CimSession[]>] [-DriveLetter <Char>] [-GptType <String>] [-IsActive] [-IsHidden] [-MbrType
<MbrType>] [-Offset <UInt64>] [-Size <UInt64>] [-ThrottleLimit <Int32>] [-UseMaximumSize] -DiskPath <String[]> [<CommonParameters>]
The New-Partiton cmdlet creates a partition on a specified Disk object. Note: This cmdlet does not support creating dynamic volumes.
<
Online Version: http://go.microsoft.com/fwlink/?LinkID=307004
Select-Object
Add-PartitionAccessPath
Get-Partition
Set-Partition
Initialize-Disk
Format-Volume
<
Example 1: Create a new partition on disk 1
PS C:\> New-Partiton -DiskNumber 1 -UseMaximumSize -AssignDriveLetter
This example creates a new partition on disk 1, using the maximum available space, and automatically assigning a drive letter.
Example 2: Get all RAW disks, initialize the disks, partition, and format them
This line gets all disk objects and then pipes the objects to the next command.
PS C:\>Get-Disk |
This line selects only objects where the PartitionStyle property value equals "RAW", and then pipes the objects to the next command.
PS C:\>Where-Object PartitionStyle –Eq "RAW" |
This line initializes all Disk objects in the pipeline and then pipes the objects to the next cmdlet.
PS C:\>Initialize-Disk -PassThru |
This line creates a maximum sized partition on each initialized Disk object, assigns a drive letter to the partitions, and then pipes the objects to the next cmdlet.
PS C:\>New-Partition -AssignDriveLetter -UseMaximumSize |
This line formats all newly partitioned disks.
PS C:\>Format-Volume
This example uses five cmdlets and the pipeline to get all disks, filter them for only RAW, unpartitioned disks, initialize the disks, partition the disks, and then format
them.