Get-PhysicalDisk
Get-PhysicalDisk
Gets a list of all PhysicalDisk objects visible across any available Storage Management Providers, or optionally a filtered list.
Sintaxis
Parameter Set: ByUniqueId
Get-PhysicalDisk [-AsJob] [-CanPool <Boolean[]> ] [-CimSession <CimSession[]> ] [-Description <String[]> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-ThrottleLimit <Int32> ] [-UniqueId <String[]> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByName
Get-PhysicalDisk [[-FriendlyName] <String[]> ] [-AsJob] [-CanPool <Boolean[]> ] [-CimSession <CimSession[]> ] [-Description <String[]> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStorageEnclosure
Get-PhysicalDisk [-AsJob] [-CanPool <Boolean[]> ] [-CimSession <CimSession[]> ] [-Description <String[]> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-StorageEnclosure <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStorageNode
Get-PhysicalDisk [-AsJob] [-CanPool <Boolean[]> ] [-CimSession <CimSession[]> ] [-Description <String[]> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-StorageNode <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStoragePool
Get-PhysicalDisk [-AsJob] [-CanPool <Boolean[]> ] [-CimSession <CimSession[]> ] [-Description <String[]> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-StoragePool <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStorageSubSystem
Get-PhysicalDisk [-AsJob] [-CanPool <Boolean[]> ] [-CimSession <CimSession[]> ] [-Description <String[]> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-StorageSubSystem <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByVirtualDisk
Get-PhysicalDisk [-AsJob] [-CanPool <Boolean[]> ] [-CimSession <CimSession[]> ] [-Description <String[]> ] [-HasAllocations <Boolean> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-SelectedForUse <Boolean> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [-VirtualDisk <CimInstance> ] [-VirtualRangeMax <UInt64> ] [-VirtualRangeMin <UInt64> ] [ <CommonParameters>]
Descripción detallada
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.
Parámetros
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CanPool<Boolean[]>
Gets physical disks that are available for use in a storage pool.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession[]>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
Session |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Description<String[]>
Gets the physical disks that contain the specified description. Enter a description, or use wildcard characters to enter a description pattern.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-FriendlyName<String[]>
Gets the physical disk with the specified friendly name. Enter a friendly name, or use wildcard characters to enter a name pattern.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-HasAllocations<Boolean>
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-HealthStatus<HealthStatus[]>
Gets only physical disks in the specified state. Valid values are Healthy, Unhealthy, Unknown, or Warning.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Manufacturer<String[]>
Gets the physical disks with the specified manufacturer. Enter a manufacturer string, or use wildcard characters to enter a pattern.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Model<String[]>
Gets the physical disks of the specified model. Enter a model string or use wildcard characters to enter a pattern.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-SelectedForUse<Boolean>
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-StorageEnclosure<CimInstance>
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-StorageNode<CimInstance>
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-StoragePool<CimInstance>
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-StorageSubSystem<CimInstance>
Accepts a StorageSubsystem object as input and gets the physical disks attached to the storage subsystem. The Storage Subsystem CIM object is exposed by the Get-StorageSubSystem cmdlet.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-UniqueId<String[]>
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.
Alias |
Id |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Usage<Usage[]>
Gets only the physical disks with the specified allocation method (usage) of the disk. Valid values are AutoSelect, HotSpare, Journal, ManualSelect, Retired, and Unknown.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-VirtualDisk<CimInstance>
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-VirtualRangeMax<UInt64>
This parameter is reserved for future use.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-VirtualRangeMin<UInt64>
This parameter is reserved for future use.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
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.
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.
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.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk
The Get-PhysicalDisk cmdlet returns objects that represent physical disks.
Notas
- El objeto
Microsoft.Management.Infrastructure.CimInstance
es una clase contenedora que muestra objetos de Instrumental de administración de Windows (WMI). La ruta de acceso después del signo de número (#
) proporciona el espacio de nombres y el nombre de clase del objeto WMI subyacente.
Ejemplos
Example 1: Getting all physical disks
This example returns an array of all PhysicalDisk objects present in the computer. A storage management provider is required to manage physical disks.
PS C:\> Get-PhysicalDisk
Example 2: Getting all physical disks eligible for adding to a storage pool
This example returns an array of PhysicalDisk objects that are available for adding to a storage pool (they are in a primordial pool).
PS C:\> Get-PhysicalDisk -CanPool $True