Created
June 25, 2017 18:53
-
-
Save gcanales75/529029c20f1459260c8910d3364dc98c to your computer and use it in GitHub Desktop.
Obtiene Información de volumenes EBS asociados a instancia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $instance = "mi_instanceId" | |
| ## Info general de la instancia | |
| #(Get-EC2Instance -InstanceId $instance).instances | where {$_.InstanceId -eq $instance} | |
| ## Volumenes | |
| $devices = ((Get-EC2Instance -InstanceId $instance).instances | where {$_.InstanceId -eq $instance}).BlockDeviceMappings | |
| $volumes = $devices.Ebs.VolumeId | |
| Foreach ($volume in $volumes) { | |
| Get-EC2Volume -VolumeId $volume | select VolumeId,Size | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment