Questions tagged [aws-powershell]

The AWS Tools for Windows PowerShell are a set of PowerShell cmdlets that are built on top of the functionality exposed by the AWS SDK for .NET.

The AWS Tools for Windows PowerShell are a set of PowerShell cmdlets that are built on top of the functionality exposed by the AWS SDK for .NET. The AWS Tools for Windows PowerShell enable you to script operations on your AWS resources from the PowerShell command line.

Questions involving the AWS Command Line Interface (CLI) should be tagged with instead.

Resources

Books

165 questions
0
votes
1 answer

cannot connect to RDS SQL server through powershell

I am trying to connect the SQL server through Powershell. $Server = 'RDS End Point,PortNO' $Database = 'DBName' $uid ='UserID' $pwd = 'Password' $connstring = 'Server=$Server; Database=$Database; ' $connstring += 'User ID=$uid;…
Rohit Singh
  • 47
  • 2
  • 10
0
votes
0 answers

How to download files from s3 latest files to local folder using powerShell script and need to include file corruption check point

I need to download latest files from AWS S3 bucket using powershell script and as well as how can tackle file corruption while downloading.
0
votes
3 answers

need to copy the Userdata script from one ec2 instance to another ec2 instance

I am working on a script through which I can create an instance and has the same setting (like vpc, subnet ID, Security group and user data) from another existing instance. I am able to get all the setting except user data as user data needs to be…
0
votes
0 answers

aws configuration user id is not getting deleted

I have three AWS accounts and I login from powershell to run script from every account. But as I frequently changes the AWS key ID, it is not taking other 2 accounts credentials and giving me only resource form one account. I have deleted the .AWS…
Rohit Singh
  • 47
  • 2
  • 10
0
votes
1 answer

AWS VPNConnection using PowerShell

I am trying to setup a new vpn connection with the AWS transit gateway using PowerShell. I need some assistance on how to setup tunnel options. AWS has very limited documentation with examples. Here is the link to the documentation:…
0
votes
1 answer

Powershell Scripts for AWS EC2 Multiaccounts

I have been looking for an example powershell script which would iterate through multiple accounts in AWS and just print EC2 instance info from every account. I have been using Python/Boto3 to accomplish the same task , but want to learn Powershell…
0
votes
1 answer

AWS CloudWatchMetricStatistic for List of Objects

I have a list of instanceIds that I want to use as input into get-cwmetricstatistic in order to output a list of summary cloudwatch metrics. I have the code to obtain the list of instanceIds and I have the code to pull back summary stats for a…
0
votes
1 answer

How do I use the AWS Powershell Tools to get ID's of security groups allowed in ingress rules?

In the AWS Web Console, viewing a security group's inbound rules can display another Security Group ID in the source column instead of an ip address. I need to view Security Group ingress rules through powershell that reference other security groups…
0
votes
0 answers

Iterate through PSOObject

I am writing a script where Block Devices attached to a EC2 instance are matched and then a corresponding tag is set. I have following PSOObject and visualization in the console New-Object PSObject -Property @{ Disk = $Disk; …
ghraz0r
  • 31
  • 5
0
votes
1 answer

AWS Powershell - Get-CWMetricStatistics for EBS Read IOPS

I'm having some issues getting IOPs stats for EBS volumes, using this code: Get-CWMetricList -Namespace AWS/EC2 |Select-Object * -Unique Get-CWMetricList -Namespace AWS/EBS |Select-Object * -Unique $StartDate = (Get-Date).AddDays(-3) $EndDate =…
0
votes
1 answer

aws cli (on powershell) waiting for the cp to finishe before doing next command

How do I check if the copy was successful before the script goes to the next command? $src_dir_local = 'D:\temp\tobemoved\' $dst_dir_local = 'D:\temp\moved\' $log_dir = 'D:\temp\log\' $log_file = 'backup.log' $ofs_char = "`n" $curr_date =…
gdubs
  • 2,724
  • 9
  • 55
  • 102
0
votes
1 answer

List Snapshot ID's with time under specific VPC ID using PowerShell

I'm trying to List Snapshot ID's with time under specific VPC ID using PowerShell or AWS CLI
0
votes
1 answer

Add a method to a resource in AWS API Gateway

How does one add a method to a resource in AWS API Gateway, using the AWS Powershell module and powershell? What I have tried so far This powershell script does not work: $op = @{Op='add'; Path='/ResourceMethods'; Value='GET'} Update-AGResource…
Sean B. Durkin
  • 12,659
  • 1
  • 36
  • 65
0
votes
1 answer

AWS s3 create folder using batch script

I have created a batch script using the aws cmdline in windows however it doesn't seems to be running from my machine. IT does run from one of the server in our infra. IF i just run the aws s3api command from my machine it runs fine. aws configure…
Parth Gandhi
  • 311
  • 8
  • 16
0
votes
0 answers

Remove-S3Bucket : The specified bucket does not exist

I had created 3 buckets for testing and then later on deleted via PowerShell Command as below: Get-S3Bucket| select -Skip 1 | foreach {Remove-S3Bucket -BucketName $_.Bucketname -DeleteBucketContent} However, after couple of hours, I run…
Ketanbhut
  • 476
  • 2
  • 11
1 2 3
10
11