I cant figure out how this works...please help...
$output = Get-EC2Instance |%{ $_.RunningInstance } | select-object InstanceId,@{Name='Key'; Expression={$_.Tag.Key} },@{Name='Value'; Expression={$_.Tag.Value} }
This command displays :
I run the second command below which splits "Key" (Each instanceId has multiple Keys associated to it. Each key has its associated value):
$output | %{$n=$_.InstanceId; $_.Key | select @{Name="InstanceID";Expression={$n}},@{Name="Key";Expression={$_}}}
The output is
How to modify the second command to include "Value" column (each key has a associated value)?
Aucun commentaire:
Enregistrer un commentaire