PowerShell Logo Small

Get-Partition



This is the built-in help made by Microsoft for the command 'Get-Partition', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' 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

Returns a list of all partition objects visible on all disks, or optionally a filtered list using specified parameters.

SYNTAX


Get-Partition [[-DiskNumber] <UInt32[]>] [[-PartitionNumber] <UInt32[]>] [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Partition [-AsJob] [-CimSession <CimSession[]>] [-DriveLetter <Char[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Partition [-AsJob] [-CimSession <CimSession[]>] [-Disk <CimInstance>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Partition [-AsJob] [-CimSession <CimSession[]>] [-DiskId <String[]>] [-Offset <UInt64[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Partition [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Volume <CimInstance>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-Partition cmdlet returns one or more Partition objects depending on the specified criteria. This cmdlet will return a Volume object or a set of Volume objects
given parameters to be used to uniquely identify a volume, or parameters to identify a set of volumes that meet the given set of criteria.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=298243
Where-Object
Get-Disk
Get-Volume

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Get-Partition



This example return all partitions, on all disks.




EXAMPLE 2

PS C:\>Get-Partition -DiskNumber 5
Disk Number: 5

PartitionNumber DriveLetter Offset Size Type
--------------- ----------- ------ ---- ----
1 H 1048576 298.09 GB IFS



This example return all partitions on disk 5.




EXAMPLE 3

PS C:\>Get-Partition -DriveLetter C
Disk Number: 0

PartitionNumber DriveLetter Offset Size Type
--------------- ----------- ------ ---- ----
2 C 368050176 465.42 GB IFS



This example partition associated with the volume for drive letter C.




EXAMPLE 4

PS C:\>Get-Partition | Where-Object –FilterScript {$_.Type -Eq "Basic"}



This example returns only the basic partitions on all disks.