Skip to content

Get-CloudDisk

SYNOPSIS

Gets managed disks from a selected cloud provider.

SYNTAX

Azure (Default)

Get-CloudDisk -ResourceGroup <string> [-Provider <string>] [-Name <string>]
 [-Status <CloudDiskStatus>] [-Tag <hashtable>] [-Detailed] [<CommonParameters>]

GCP

Get-CloudDisk -Project <string> [-Provider <string>] [-Name <string>] [-Status <CloudDiskStatus>]
 [-Tag <hashtable>] [-Detailed] [<CommonParameters>]

AWS

Get-CloudDisk -Region <string> [-Provider <string>] [-Name <string>] [-Status <CloudDiskStatus>]
 [-Tag <hashtable>] [-Detailed] [<CommonParameters>]

All

Get-CloudDisk -All [-Name <string>] [-Status <CloudDiskStatus>] [-Tag <hashtable>] [-Detailed]
 [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, None

DESCRIPTION

Routes disk inventory requests to the matching provider backend and returns normalized cloud record objects for the disk surface.

Use -All to query every provider that has an established session context, returning disks from all connected clouds in one pipeline.

EXAMPLES

EXAMPLE 1

Get-CloudDisk -Provider Azure -ResourceGroup 'prod-rg'

Gets Azure managed disks in a resource group.

EXAMPLE 2

Get-CloudDisk -Provider AWS -Region 'us-east-1'

Gets AWS EBS volumes in a region.

EXAMPLE 3

Get-CloudDisk -Provider GCP -Project 'my-project'

Gets GCP persistent disks for a project.

EXAMPLE 4

Get-CloudDisk -All

Gets disks from all providers with an established session context. Use after Connect-Cloud -Provider AWS, Azure, GCP.

EXAMPLE 5

Get-CloudDisk -All -Status Available -Tag @{ environment = 'production' }

Gets all available disks with the production environment tag across all connected clouds.

EXAMPLE 6

Get-CloudDisk -Provider Azure -ResourceGroup 'prod-rg' -Name 'data-disk-01'

Gets Azure managed disks matching the specified name.

EXAMPLE 7

Get-CloudDisk -Provider AWS -Region 'us-east-1' -Detailed

Gets AWS EBS volumes with detailed view enabled.

PARAMETERS

-All

Query all providers with an established session context.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: All
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Detailed

Emit detailed view records.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: All
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: GCP
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: AWS
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Azure
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

Filter results by name.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: All
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: GCP
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: AWS
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Azure
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Project

The GCP project to query for persistent disks.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: GCP
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Provider

The cloud provider to query.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: GCP
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: AWS
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Azure
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Region

The AWS region to query for EBS volumes.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: AWS
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ResourceGroup

The Azure resource group containing the target disks.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Azure
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Status

Filter results by disk status.

Type: CloudDiskStatus
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: All
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: GCP
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: AWS
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Azure
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Tag

Filter results by tag key-value pairs. All specified tags must match.

Type: System.Collections.Hashtable
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: All
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: GCP
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: AWS
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Azure
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Management.Automation.PSObject

See the command description and examples above.

NOTES

None.