Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
Gets one or more disks visible to the operating system.
Parameter Set: ByNumber
Get-Disk [[-Number] <UInt32[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByiSCSIConnection
Get-Disk [-AsJob] [-CimSession <CimSession[]> ] [-iSCSIConnection <CimInstance> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByiSCSISession
Get-Disk [-AsJob] [-CimSession <CimSession[]> ] [-iSCSISession <CimInstance> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByName
Get-Disk [-AsJob] [-CimSession <CimSession[]> ] [-FriendlyName <String[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByPartition
Get-Disk [-AsJob] [-CimSession <CimSession[]> ] [-Partition <CimInstance> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByPath
Get-Disk [-AsJob] [-CimSession <CimSession[]> ] [-Path <String[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByUniqueId
Get-Disk [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-UniqueId <String[]> ] [ <CommonParameters>]
Parameter Set: ByVirtualDisk
Get-Disk [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-VirtualDisk <CimInstance> ] [ <CommonParameters>]
The Get-Disk cmdlet gets one or more Disk objects visible to the operating system, or optionally a filtered list.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Executa o cmdlet em uma sessão remota ou em um computador remoto. Insira um nome do computador ou um objeto de sessão, como a saída de um cmdlet New-CimSession ou Get-CimSession. O padrão é a sessão atual do computador local.
Aliases |
Session |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Gets the disk with the specified friendly name. Enter a friendly name, or use wildcard characters to enter a name pattern.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Specifies the disk number for which to get the associated Disk object.
Aliases |
DeviceId |
Necessário? |
false |
Posição? |
1 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Accepts a Partition object as input. The Partition CIM object is exposed by the Get-Partition cmdlet.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByValue) |
Aceitar caracteres curinga? |
false |
Contains valid path information.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Especifica o número máximo de operações simultâneas que podem ser estabelecidas para executar o cmdlet. Se esse parâmetro for omitido ou um valor de 0
for inserido, o Windows PowerShell® calculará o limite ideal de restrição para o cmdlet com base no número de cmdlets do CIM que estão em execução no computador. O limite de restrição se aplica somente ao cmdlet atual, e não à sessão ou ao computador.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Gets only the disks with the specified IDs. Type one or more IDs (separated by commas).
Aliases |
Id |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Accepts a VirtualDisk object as input. The Virtual Disk CIM object is exposed by the Get-VirtualDisk cmdlet.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByValue) |
Aceitar caracteres curinga? |
false |
Accepts an iSCSIConnection object as input. The iSCSI Connection CIM object is exposed by the Get-IscsiConnection cmdlet.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByValue) |
Aceitar caracteres curinga? |
false |
Accepts an iSCSISession object as input. The iSCSI Session CIM object is exposed by the Get-IscsiSession cmdlet.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
True (ByValue) |
Aceitar caracteres curinga? |
false |
Esse cmdlet dá suporte a parâmetros comuns: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Para obter mais informações, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
O tipo de entrada é o tipo dos objetos que você pode canalizar para o cmdlet.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_IscsiConnection
You can pipe an iSCSIConnection object to the iSCSIConnection parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_IscsiSession
You can pipe an iSCSISession object to the iSCSISession parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition
You can pipe a Partition object to the Partition parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk
You can pipe a VirtualDisk object to the VirtualDisk parameter.
O tipo de saída é o tipo de objeto emitido pelo cmdlet.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk
This cmdlet outputs one or more objects representing disks.
O objeto
Microsoft.Management.Infrastructure.CimInstance
é uma classe wrapper que exibe objetos da WMI (Instrumentação de Gerenciamento do Windows). O caminho após o sinal de cerquilha (#
) indica o namespace e o nome de classe do objeto subjacente da WMI.Some objects such as disks might include trailing spaces in their friendly names. If you suspect that an object name could have trailing spaces, you can use a wildcard at the end of the name, for example Disk*, or use the Match parameter to instruct Windows PowerShell to include all strings that include the specified characters, instead of only strings that include only the specified characters.
This example gets all disks visible to the operating system.
PS C:\> Get-Disk
This example gets disk 6.
PS C:\> Get-Disk -Number 6
This example gets all disks attached via the USB bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the USB value of the Bustype property.
PS C:\> Get-Disk | Where-Object –FilterScript {$_.Bustype -Eq "USB"}
This example gets all disks attached via the iSCSI bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the iSCSI value of the Bustype property. It then passes the Disk objects in the pipeline to the Get-IscisSession cmdlet, which gets the associated iSCSI sessions, and then pipes the output to the Format-Table cmdlet for simplified display.
PS C:\> Get-Disk | Where-Object –FilterScript {$_.BusType -Eq "iSCSI"} |
Get-IscsiSession | Format-Table