diff --git a/docset/winserver2025-ps/storage/Get-PhysicalDisk.md b/docset/winserver2025-ps/storage/Get-PhysicalDisk.md index 5b00e5a816..4c0086334c 100644 --- a/docset/winserver2025-ps/storage/Get-PhysicalDisk.md +++ b/docset/winserver2025-ps/storage/Get-PhysicalDisk.md @@ -1,8 +1,8 @@ --- -description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell. +description: Gets a list of all PhysicalDisk objects visible across any available Storage Management Providers, or optionally a filtered list. external help file: StorageScripts-help.xml Module Name: Storage -ms.date: 12/20/2016 +ms.date: 3/24/2025 online version: https://learn.microsoft.com/powershell/module/storage/get-physicaldisk?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Get-PhysicalDisk @@ -11,98 +11,119 @@ title: Get-PhysicalDisk # Get-PhysicalDisk ## SYNOPSIS -Gets a list of all PhysicalDisk objects visible across any available Storage Management Providers, or optionally a filtered list. + +Gets a list of all **PhysicalDisk** objects visible across any available Storage Management +Providers, or optionally a filtered list. ## SYNTAX ### ByUniqueId (Default) + ``` Get-PhysicalDisk [-UniqueId ] [-Usage ] [-Description ] - [-Manufacturer ] [-Model ] [-CanPool ] [-HealthStatus ] - [-CimSession ] [] +[-Manufacturer ] [-Model ] [-CanPool ] +[-HealthStatus ] [-CimSession ] [] ``` ### ByObjectId + ``` Get-PhysicalDisk [-ObjectId ] [-Usage ] [-Description ] - [-Manufacturer ] [-Model ] [-CanPool ] [-HealthStatus ] - [-CimSession ] [] +[-Manufacturer ] [-Model ] [-CanPool ] +[-HealthStatus ] [-CimSession ] [] ``` ### ByName + ``` Get-PhysicalDisk [[-FriendlyName] ] [[-SerialNumber] ] [-Usage ] - [-Description ] [-Manufacturer ] [-Model ] [-CanPool ] - [-HealthStatus ] [-CimSession ] [] +[-Description ] [-Manufacturer ] [-Model ] [-CanPool ] +[-HealthStatus ] [-CimSession ] [] ``` ### ByInputObject + ``` Get-PhysicalDisk -InputObject [-CimSession ] [] ``` ### ByStorageSubsystem + ``` -Get-PhysicalDisk -StorageSubsystem [-Usage ] [-Description ] - [-Manufacturer ] [-Model ] [-CanPool ] [-HealthStatus ] - [-CimSession ] [] +Get-PhysicalDisk -StorageSubsystem [-Usage ] +[-Description ] [-Manufacturer ] [-Model ] [-CanPool ] +[-HealthStatus ] [-CimSession ] [] ``` ### ByStorageEnclosure + ``` -Get-PhysicalDisk -StorageEnclosure [-Usage ] [-Description ] - [-Manufacturer ] [-Model ] [-CanPool ] [-HealthStatus ] - [-CimSession ] [] +Get-PhysicalDisk -StorageEnclosure [-Usage ] +[-Description ] [-Manufacturer ] [-Model ] [-CanPool ] +[-HealthStatus ] [-CimSession ] [] ``` ### ByStorageNode + ``` Get-PhysicalDisk -StorageNode [-PhysicallyConnected] [-Usage ] - [-Description ] [-Manufacturer ] [-Model ] [-CanPool ] - [-HealthStatus ] [-CimSession ] [] +[-Description ] [-Manufacturer ] [-Model ] [-CanPool ] +[-HealthStatus ] [-CimSession ] [] ``` ### ByStoragePool + ``` Get-PhysicalDisk -StoragePool [-Usage ] [-Description ] - [-Manufacturer ] [-Model ] [-CanPool ] [-HealthStatus ] - [-CimSession ] [] +[-Manufacturer ] [-Model ] [-CanPool ] +[-HealthStatus ] [-CimSession ] [] ``` ### ByVirtualDisk + ``` Get-PhysicalDisk -VirtualDisk [-VirtualRangeMin ] [-VirtualRangeMax ] - [-HasAllocations ] [-SelectedForUse ] [-NoRedundancy] [-Usage ] - [-Description ] [-Manufacturer ] [-Model ] [-CanPool ] - [-HealthStatus ] [-CimSession ] [] +[-HasAllocations ] [-SelectedForUse ] [-NoRedundancy] +[-Usage ] [-Description ] [-Manufacturer ] [-Model ] +[-CanPool ] [-HealthStatus ] [-CimSession ] +[] ``` -## DESCRIPTION -The **Get-PhysicalDisk** cmdlet gets a list of all PhysicalDisk objects visible across any available Storage Management Providers, or optionally a filtered list of disks. +## Description + +Gets a list of all **PhysicalDisk** objects visible across any available Storage Management +Providers, or optionally a filtered list of disks. -## EXAMPLES +## Examples ### Example 1: Getting all physical disks -``` -PS C:\> Get-PhysicalDisk -FriendlyName CanPool OperationalStatus HealthStatus Usage Size ------------- -------- ----------------- ------------ ----- ---- -PhysicalDisk4 False OK Healthy Data Store 25 GB + +```PowerShell +Get-PhysicalDisk ``` -This example returns an array of all PhysicalDisk objects present in the computer. -A storage management provider is required to manage physical disks. +This example returns an array of all **PhysicalDisk** objects present in the computer, as shown in +the following output. A storage management provider is required to manage physical disks. -### Example 2: Getting all physical disks eligible for adding to a storage pool +```Output +FriendlyName CanPool OperationalStatus HealthStatus Usage Size +------------ -------- ----------------- ------------ ----- ---- +PhysicalDisk4 False OK Healthy Data Store 25 GB ``` -PS C:\>Get-PhysicalDisk -CanPool $True + +### Example 2: Getting all physical disks eligible for adding to a storage pool + +```PowerShell +Get-PhysicalDisk -CanPool $True ``` -This example returns an array of PhysicalDisk objects that are available for adding to a storage pool (they are in a primordial pool). +This example returns an array of **PhysicalDisk** objects that are available for adding to a storage +pool (they're in a primordial pool). -## PARAMETERS +## Parameters ### -CanPool + Gets physical disks that are available for use in a storage pool. ```yaml @@ -118,9 +139,11 @@ 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-CimSession](/powershell/module/cimcmdlets/new-cimsession) or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet. -The default is the current session on the local computer. + +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](/powershell/module/cimcmdlets/new-cimsession) or +[Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet. The default is the +current session on the local computer. ```yaml Type: CimSession @@ -135,8 +158,9 @@ Accept wildcard characters: False ``` ### -Description -Gets the physical disks that contain the specified description. -Enter a description or use wildcard characters to enter a description pattern. + +Gets the physical disks that contain the specified description. Enter a description or use wildcard +characters to enter a description pattern. ```yaml Type: String @@ -151,6 +175,7 @@ Accept wildcard characters: False ``` ### -FriendlyName + Gets the physical disk with the specified friendly name. Enter a friendly name or use wildcard characters to enter a name pattern. @@ -167,7 +192,9 @@ Accept wildcard characters: False ``` ### -HasAllocations -Indicates whether the cmdlet gets a list of physical disks that host the extents of the virtual disk that you specify by using the *VirtualDisk* parameter. + +Indicates whether the cmdlet gets a list of physical disks that host the extents of the virtual disk +that you specify by using the `VirtualDisk` parameter. ```yaml Type: Boolean @@ -182,13 +209,13 @@ Accept wildcard characters: False ``` ### -HealthStatus -Specifies the **health status** of physical disks. -The acceptable values for this parameter are: -- Healthy -- Unhealthy -- Unknown -- Warning +Specifies the health status of physical disks. The acceptable values for this parameter are: + +- `Healthy` +- `Unhealthy` +- `Unknown` +- `Warning` ```yaml Type: PhysicalDiskHealthStatus @@ -204,6 +231,7 @@ Accept wildcard characters: False ``` ### -InputObject + Specifies the input object that is used in a pipeline command. ```yaml @@ -219,8 +247,9 @@ Accept wildcard characters: False ``` ### -Manufacturer -Gets the physical disks with the specified manufacturer. -Enter a manufacturer string or use wildcard characters to enter a pattern. + +Gets the physical disks with the specified manufacturer. Enter a manufacturer string or use wildcard +characters to enter a pattern. ```yaml Type: String @@ -235,8 +264,9 @@ Accept wildcard characters: False ``` ### -Model -Gets the physical disks of the specified model. -Enter a model string or use wildcard characters to enter a pattern. + +Gets the physical disks of the specified model. Enter a model string or use wildcard characters to +enter a pattern. ```yaml Type: String @@ -251,7 +281,9 @@ Accept wildcard characters: False ``` ### -NoRedundancy -Indicates that this cmdlet gets physical disks that contain the last remaining copy of the data of a virtual disk. + +Indicates that this cmdlet gets physical disks that contain the last remaining copy of the data of a +virtual disk. ```yaml Type: SwitchParameter @@ -266,6 +298,7 @@ Accept wildcard characters: False ``` ### -ObjectId + Specifies the ID of the physical disk to get. ```yaml @@ -281,7 +314,9 @@ Accept wildcard characters: False ``` ### -PhysicallyConnected -Indicates that this cmdlet gets physical disks that are physically connected to the specified storage node. + +Indicates that this cmdlet gets physical disks that are physically connected to the specified +storage node. ```yaml Type: SwitchParameter @@ -296,8 +331,11 @@ Accept wildcard characters: False ``` ### -SelectedForUse -Indicates whether the cmdlet gets a list of physical disks to host the extents that belong to the virtual disk specified by the *VirtualDisk* parameter. -Specify the physical disks to host the extents of a virtual disk by using the *PhysicalDisksToUse* parameter of the **New-VirtualDisk** cmdlet. + +Indicates whether the cmdlet gets a list of physical disks to host the extents that belong to the +virtual disk specified by the `VirtualDisk` parameter. Specify the physical disks to host the +extents of a virtual disk by using the `PhysicalDisksToUse` parameter of the **New-VirtualDisk** +cmdlet. ```yaml Type: Boolean @@ -312,6 +350,7 @@ Accept wildcard characters: False ``` ### -SerialNumber + Specifies the serial number of the physical disk to get. ```yaml @@ -327,8 +366,9 @@ Accept wildcard characters: False ``` ### -StorageEnclosure + Specifies a storage enclosure associated with the physical disk that this cmdlet gets. -To obtain a **StorageEnclosure** object, use the **Get-StorageEnclosure** cmdlet. +To obtain a **StorageEnclosure** object, use the `Get-StorageEnclosure` cmdlet. ```yaml Type: CimInstance @@ -343,9 +383,10 @@ Accept wildcard characters: False ``` ### -StorageNode + Specifies a storage node as a **CimInstance** object. The cmdlet gets the physical disk connected to the node that you specify. -To obtain a storage node object, use the **Get-StorageNode** cmdlet. +To obtain a storage node object, use the `Get-StorageNode` cmdlet. ```yaml Type: CimInstance @@ -360,8 +401,9 @@ Accept wildcard characters: False ``` ### -StoragePool + Accepts a StoragePool object as input and gets the physical disks that belong to the pool. -The Storage Pool CIM object is exposed by the **Get-StoragePool** cmdlet. +The Storage Pool CIM object is exposed by the `Get-StoragePool` cmdlet. ```yaml Type: CimInstance @@ -376,9 +418,10 @@ Accept wildcard characters: False ``` ### -StorageSubsystem + Specifies a storage subsystem. This cmdlet gets physical disks attached to the storage subsystem that you specify. -To obtain a **StorageSubsystem** object, use the **Get-StorageSubSystem** cmdlet. +To obtain a **StorageSubsystem** object, use the `Get-StorageSubSystem` cmdlet. ```yaml Type: CimInstance @@ -393,8 +436,9 @@ Accept wildcard characters: False ``` ### -UniqueId -Gets only the physical disks with the specified IDs. -Type one or more IDs (separated by commas), or use wildcard characters to enter a pattern. + +Gets only the physical disks with the specified IDs. Type one or more IDs (separated by commas), or +use wildcard characters to enter a pattern. ```yaml Type: String @@ -409,16 +453,16 @@ Accept wildcard characters: False ``` ### -Usage -Specifies an allocation method or usage. -This cmdlet gets the physical disks that have the specified allocation method. -The acceptable values for this parameter are: -- AutoSelect -- HotSpare -- Journal -- ManualSelect -- Retired -- Unknown +Specifies an allocation method or usage. This cmdlet gets the physical disks that have the specified +allocation method. The acceptable values for this parameter are: + +- `AutoSelect` +- `HotSpare` +- `Journal` +- `ManualSelect` +- `Retired` +- `Unknown` ```yaml Type: PhysicalDiskUsage @@ -434,8 +478,9 @@ Accept wildcard characters: False ``` ### -VirtualDisk -Accepts a VirtualDisk object as input and gets the physical disks used by the virtual disk. -The VirtualDisk object is exposed by the **Get-VirtualDisk** cmdlet. + +Accepts a **VirtualDisk** object as input and gets the physical disks used by the virtual disk. The +**VirtualDisk** object is exposed by the `Get-VirtualDisk` cmdlet. ```yaml Type: CimInstance @@ -450,6 +495,7 @@ Accept wildcard characters: False ``` ### -VirtualRangeMax + This parameter is reserved for future use. ```yaml @@ -465,6 +511,7 @@ Accept wildcard characters: False ``` ### -VirtualRangeMin + This parameter is reserved for future use. ```yaml @@ -480,46 +527,58 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). -## INPUTS +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool -You can use the pipeline operator to pass an MSFT_StoragePool object to the *StoragePool* parameter. + +You can use the pipeline operator to pass an **MSFT_StoragePool** object to the **StoragePool** +parameter. ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StorageSubsystem -You can use the pipeline operator to pass an MSFT_StorageSubsystem object to the *StorageSubsystem* parameter. + +You can use the pipeline operator to pass an **MSFT_StorageSubsystem** object to the +**StorageSubsystem** parameter. ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk -You can use the pipeline operator to pass an MSFT_VirtualDisk object to the *VirtualDisk* parameter. -## OUTPUTS +You can use the pipeline operator to pass an **MSFT_VirtualDisk** object to the **VirtualDisk** +parameter. + +## Outputs ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk -The Get-PhysicalDisk cmdlet returns objects that represent physical disks. -## NOTES +The `Get-PhysicalDisk` cmdlet returns objects that represent physical disks. + +## Notes -* When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster). +* When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all + servers in the cluster). -## RELATED LINKS +## Related links -[Add-PhysicalDisk](./Add-PhysicalDisk.md) +- [Add-PhysicalDisk](./Add-PhysicalDisk.md) -[Get-StorageEnclosure](./Get-StorageEnclosure.md) +- [Remove-PhysicalDisk](./Remove-PhysicalDisk.md) -[Get-StoragePool](./Get-StoragePool.md) +- [Reset-PhysicalDisk](./Reset-PhysicalDisk.md) -[Get-StorageSubSystem](./Get-StorageSubsystem.md) +- [Set-PhysicalDisk](./Set-PhysicalDisk.md) -[New-StoragePool](./New-StoragePool.md) +- [Get-StorageEnclosure](./Get-StorageEnclosure.md) -[Remove-PhysicalDisk](./Remove-PhysicalDisk.md) +- [Get-StoragePool](./Get-StoragePool.md) -[Reset-PhysicalDisk](./Reset-PhysicalDisk.md) +- [New-StoragePool](./New-StoragePool.md) -[Set-PhysicalDisk](./Set-PhysicalDisk.md) +- [Get-StorageSubSystem](./Get-StorageSubsystem.md) -[New-VirtualDisk](./New-VirtualDisk.md) +- [Get-StorageNode](./Get-StorageNode.md) -[Get-StorageNode](./Get-StorageNode.md) +- [New-VirtualDisk](./New-VirtualDisk.md) \ No newline at end of file