Get-VirtualDisk
Get-VirtualDisk
Returns a list of VirtualDisk objects, across all storage pools, across all providers, or optionally a filtered subset based on provided criteria.
Syntaxe
Parameter Set: ByFriendlyName
Get-VirtualDisk [[-FriendlyName] <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByDisk
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-Disk <CimInstance> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByInitiatorId
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-InitiatorId <CimInstance> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByInitiatorPort
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-InitiatorPort <CimInstance> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByMaskingSet
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-MaskingSet <CimInstance> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByName
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-Name <String[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByPhysicalDisk
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-PhysicalDisk <CimInstance> ] [-PhysicalRangeMax <UInt64> ] [-PhysicalRangeMin <UInt64> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: BySourceVirtualDisk
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-SourceVirtualDisk <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStorageJob
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StorageJob <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStorageNode
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StorageNode <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStoragePool
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StoragePool <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStorageSubSystem
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StorageSubSystem <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByStorageTier
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-StorageTier <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByTargetPort
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-TargetPort <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByTargetVirtualDisk
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-TargetVirtualDisk <CimInstance> ] [-ThrottleLimit <Int32> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Parameter Set: ByUniqueId
Get-VirtualDisk [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-IsSnapshot <Boolean[]> ] [-OtherUsageDescription <String[]> ] [-ThrottleLimit <Int32> ] [-UniqueId <String[]> ] [-Usage <Usage[]> ] [ <CommonParameters>]
Description détaillée
The Get-VirtualDisk cmdlet returns a list of VirtualDisk objects, across all storage pools, across all providers, or optionally a filtered subset based on provided criteria.
Paramètres
-AsJob
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-CimSession<CimSession[]>
Exécute l’applet de commande dans une session à distance ou sur un ordinateur distant. Entrez un nom d’ordinateur ou un objet de session, comme la sortie d’une applet de commande New-CimSession ou Get-CimSession. La valeur par défaut est la session active sur l’ordinateur local.
Alias |
Session |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-Disk<CimInstance>
Accepts a Disk object as input. The Disk CIM object is exposed by the Get-Disk cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-FriendlyName<String[]>
Specifies a friendly name for a disk. The friendly name may be defined by a user and is not guaranteed to be unique.
Alias |
none |
Obligatoire ? |
false |
Position ? |
1 |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByPropertyName) |
Accepter les caractères génériques ? |
false |
-HealthStatus<HealthStatus[]>
Specifies the status of an object and indicates if the object is Healthy or Warning Unhealthy.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-InitiatorId<CimInstance>
Accepts an InitiatorId object as input. The Initiator ID CIM object is exposed by the Get-InitiatorId cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-InitiatorPort<CimInstance>
Accepts an InitiatorPort object as input. The Initiator Port CIM object is exposed by the Get-InitiatorPort cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-IsSnapshot<Boolean[]>
Specifies that the virtual disk is a snapshot of another virtual disk.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-MaskingSet<CimInstance>
Accepts a MaskingSet object as input. The Masking Set CIM object is exposed by the Get-MaskingSet cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-Name<String[]>
Specifies the name of an object or setting.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByPropertyName) |
Accepter les caractères génériques ? |
false |
-OtherUsageDescription<String[]>
Specifies the usage of this object.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-PhysicalDisk<CimInstance>
Accepts a PhysicalDisk object as input. The Physical Disk CIM object is exposed by the Get-PhysicalDisk cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-PhysicalRangeMax<UInt64>
This parameter is reserved for future use.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-PhysicalRangeMin<UInt64>
This parameter is reserved for future use.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-SourceVirtualDisk<CimInstance>
Specifies a virtual disk as a CIMInstance object. The cmdlet gets the snapshot or clone virtual disks that were created from the virtual disk that you specify. To obtain a virtual disk object, use the Get-VirtualDisk cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-StorageJob<CimInstance>
Specifies an outstanding storage job as a CIMInstance object. The cmdlet gets the virtual disks associated with the storage jobs that you specify. To obtain a virtual disk object, use the Get-StorageJob cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-StorageNode<CimInstance>
Specifies a storage node as a CIMInstance object. The cmdlet gets the virtual disks that belong to the storage node that you specify. The virtual disks that belong to the storage node have read/write permissions on the node. To obtain a virtual disk object, use the Get-StorageNode cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-StoragePool<CimInstance>
Accepts a StoragePool object as input. The Storage Pool CIM object is exposed by the Get-StoragePool cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-StorageSubSystem<CimInstance>
Accepts a StorageSubsystem object as input. The Storage Subsystem CIM object is exposed by the Get-StorageSubsystem cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-StorageTier<CimInstance>
Specifies a storage tier as a CIMInstance object. The cmdlet gets the virtual disks included in the storage tier that you specify. To obtain a virtual disk object, use the Get-StorageTier cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-TargetPort<CimInstance>
Accepts a TargetPort object as input. The Target Port CIM object is exposed by the Get-TargetPort cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue) |
Accepter les caractères génériques ? |
false |
-TargetVirtualDisk<CimInstance>
Specifies a virtual disk as a CIMInstance object. The cmdlet gets the virtual disk from which the snapshot or clone virtual disk that you specify were created. To obtain a virtual disk object, use the Get-VirtualDisk cmdlet.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-ThrottleLimit<Int32>
Spécifie le nombre maximal d’opérations simultanées qui peuvent être établies pour exécuter cette applet de commande. Si ce paramètre est omis ou si la valeur 0
est entrée, Windows PowerShell ® calcule une limitation optimale pour l’applet de commande en fonction du nombre d’applets de commande CIM qui s’exécutent sur l’ordinateur. La limitation s’applique seulement à l’applet de commande actuelle, et non pas à la session ni à l’ordinateur.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-UniqueId<String[]>
Specifies an ID used to uniquely identify a Disk object in the system. The ID persists through restarts.
Alias |
Id |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByPropertyName) |
Accepter les caractères génériques ? |
false |
-Usage<Usage[]>
Indicates the intended usage of the virtual disk.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
<CommonParameters>
Cette applet de commande prend en charge les paramètres courants : -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer et -OutVariable. Pour plus d’informations, consultez about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entrées
Le type d’entrée correspond au type des objets que vous pouvez transmettre à l’applet de commande.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk
You can use the pipeline operator to pass an MSFT_Disk object to the Disk parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_InitiatorId
You can use the pipeline operator to pass an MSFT_InitiatorId object to the InitiatorId parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_InitiatorPort
You can use the pipeline operator to pass an MSFT_InitiatorPort object to the InitiatorPort parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet
You can use the pipeline operator to pass an MSFT_MaskingSet object to the MaskingSet parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk
You can use the pipeline operator to pass an MSFT_PhysicalDisk object to the PhysicalDisk parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool
L’objet
Microsoft.Management.Infrastructure.CimInstance
est une classe wrapper qui affiche des objets WMI (Windows Management Instrumentation). Le chemin d’accès situé après le symbole dièse (#
) fournit l’espace de noms et le nom de classe de l’objet WMI sous-jacent.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_StorageTier
You can use the pipeline operator to pass an MSFT_StorageTier object to the StorageTier parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_TargetPort
You can use the pipeline operator to pass an MSFT_TargetPort object to the TargetPort parameter.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_TargetVirtualDisk
You can use the pipeline operator to pass an MSFT_TargetVirtualDisk object to the TargetVirtualDisk parameter.
Sorties
Le type de sortie est le type des objets émis par l’applet de commande.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk
This cmdlet outputs an object that represents the specified virtual disk.
Exemples
EXAMPLE 1
This example returns all VirtualDisk objects across all visible StoragePool objects, across all visible StorageProvider objects.
PS C:\> Get-VirtualDisk
EXAMPLE 2
This example lists only the virtual disks from the StoragePool object named SpacesPool.
PS C:\> $stpool = (Get-StoragePool -FriendlyName "SpacesPool")
PS C:\> Get-VirtualDisk -StoragePool $stpool
EXAMPLE 3
This example lists all virtual disks, across all pools, and all providers, which are not currently in a healthy state.
PS C:\> Get-VirtualDisk | Where-Object –FilterScript {$_.HealthStatus -Ne "Healthy"}
EXAMPLE 4
This example gets the partition and volume associated with a virtual disk. The command gets the virtual disk named VDisk01 and passes the virtual disk to the Get-Disk cmdlet by using the pipeline operator. The Get-Disk cmdlet gets the disk associated with the virtual disk and passes the disk to the Get-Partition by using the pipeline operator. The Get-Partition cmdlet gets the partition associated with the disk, and passes the partition to the Get-Volume cmdlet by using the pipeline operator. The Get-Volume cmdlet gets the volume associated with the partition.
PS C:\> Get-VirtualDisk –FriendlyName "VDisk01" | Get-Disk | Get-Partition | Get-Volume