Skip to content

Instantly share code, notes, and snippets.

@EscVector
Last active December 20, 2020 23:49
Show Gist options
  • Save EscVector/cc2f083e3d6362efc37b3420ad72e746 to your computer and use it in GitHub Desktop.
Save EscVector/cc2f083e3d6362efc37b3420ad72e746 to your computer and use it in GitHub Desktop.
FOR /F %i IN (regions.txt) do @aws ssm get-parameters --names /aws/service/ami-windows-latest/Windows_Server-2019-English-Full-Base --query "Parameters[]" --region "%i" >> winami.json
FOR /F %i IN ('aws ec2 describe-instances --filters "Name=tag:Name,Values=tableau" --query "Reservations[*].Instances[*].{Instance:InstanceId}" --output text') DO echo start | aws ec2 start-instances --instance-ids %i
FOR /F %i IN (all_regions.txt) DO @FOR /F %q IN ('aws ec2 describe-vpcs --query "Vpcs[*].VpcId" --region %i --output text') DO @echo %i %q
FOR /L %i in (1,1,254) do ping -w 25 -n 1 10.0.0.%i | grep "Reply" >> n.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment