Get-Partition
Get-Partition [[-DiskNumber] <UInt32[]>] [[-PartitionNumber] <UInt32[]>] [-CimSession <CimSession[]>][-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Partition [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Volume <CimInstance>] [<CommonParameters>]
Get-Partition [-CimSession <CimSession[]>] [-Disk <CimInstance>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Partition [-CimSession <CimSession[]>] [-DriveLetter <Char[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-Partition [-CimSession <CimSession[]>] [-Offset <UInt64[]>] [-ThrottleLimit <Int32>] -DiskId <String[]>[<CommonParameters>]
Get-Partition [-StorageSubSystem <Microsoft.Management.Infrastructure.CimInstance>] [<CommonParameters>]
Get-Partition [-UniqueId <String[]>] [<CommonParameters>]
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.
Parameters
-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.
-Disk [<CimInstance>]
- Accepts pipeline input ByValue
Accepts a Disk object as input. The Disk CIM object is exposed by the Get-Disk cmdlet.
-DiskId <String[]>
- This value is required
- Accepts pipeline input ByPropertyName
Specifies an ID used to identify a disk in the system.
-DiskNumber [<UInt32[]>]
- Accepts pipeline input ByPropertyName
Specifies an array of disk numbers.
-DriveLetter [<Char[]>]
- Accepts pipeline input ByPropertyName
Specifies a letter used to identify a drive or volume in the system. Specifically the drive on which the partition resides.
-Offset [<UInt64[]>]
- Accepts pipeline input ByPropertyName
Specifies the starting offset, in bytes.
-PartitionNumber [<UInt32[]>]
Specifies the number of the partition.
-StorageSubSystem
[<Microsoft.Management.Infrastructure.CimInstance>]
- Accepts pipeline input ByValue
Specifies the storage subsystem from which to get paritions. To obtain a StorageSubsystem object, use the Get-StorageSubSystem cmdlet.
-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 PowerShellr 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.
-UniqueId [<String[]>]
- Accepts pipeline input ByPropertyName
Specifies the ID of the partition to get.
-Volume [<CimInstance>]
- Accepts pipeline input ByValue
Accepts a Volume object as input. The Volume CIM object is exposed by the Get-Volume cmdlet.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.
Inputs
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_DiskOutputs
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PartitionsThis work is licensed under a Creative Commons Attribution 4.0 International. It is attributed to Microsoft Corporation and can be found here.
PowerShell Commands