since this turned out to be more difficult than I'd thought, posting it here.
$dbserver_instance = (Get-EC2Instance -Filter @{Name="tag:Name";Value="yourservernamehere"} -Region us-east-1).Instances
get-ec2volume -filter @{Name="attachment.instance-id";value="$($dbserver_instance.instanceid)"} -region us-east-1
The tricky part is the tag:Name, which isn't obvious. Also odd, if you just run the get-ec2volume with the tag:name and value, you get the exact same message as if you ran get-ec2instance! I don't pretend to understand that.
Tuesday, June 26, 2018
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment