Created
April 6, 2015 03:50
-
-
Save murarisumit/7701cb24bee275d035d1 to your computer and use it in GitHub Desktop.
AWS powershell get all instance private IP
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
$instances = (Get-ec2instance -region us-east-1 ).Instances | |
$servers = @() | |
foreach( $instance in $instances) { | |
$ipAddrs+=$instance.PrivateIpAddress | |
} | |
foreach ($ip in $ipAddrs) { | |
write-host $ip | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment