Created
November 29, 2016 02:05
-
-
Save beargolightly/23c2409e9015997880f5c929de022a1d to your computer and use it in GitHub Desktop.
Generate Palo Alto object/group creation script from AWS regions/services
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
| #requires the AWS Toolkit for get-awspublicipaddressrange | |
| $iprange = (Get-AWSPublicIpAddressRange -Region us-east-1 -ServiceKey ec2) | |
| $iprange.ipprefix | % {write-host "set address AWS-$($_.Split('/')[0]) ip-netmask $_" ; write-host set address-group AWS_useast_ec2 static AWS-$($_.Split('/')[0]) } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am aware that write-host is literally the worst thing that has happened in history, but I was on a time budget and write-output goes off the deep end with the same syntax