Posts

How to get a list of RDS instances with status of backup (Powers-hell script)

This power-shell script helps to get the list of RDS instances .in some scenarios we need to generate reports of RDS instances to review periodically for cost optimisation purpose. This script will helpful to create a CSV file with all RDS instances. The script will generate the list of RDS instances with following details. - RDS instanceID - Status of backups - Backup Retention period - RDS DB version -RDS creation date - Current status ( Ruining / stop ) Pre-requirements to run the script AWS_Profile_Name aws credential file needs to be updated with aws_access_key_id and aws_secret_access_key. The aws config file is in C:\Users\user_profile_name\.aws\credentils.

Get AWS snapshot report into Excel (Powershell script)

Image
Snapshots are accruing more cost in aws field. Time to time we need to do clean up snapshots as cost optimisation process. This power-shell scripts helps to get the list of snapshots in to excel in particular AWS account  .  This script helps to get EC2 snapshots details into CSV file with following fields. The CVS file is creating with the name of current date. - VolumeID - SnapshotID - Size - Description - Starttime - State - Encryption - OwnerID Pre-requirements to run the script AWS_Profile_Name aws credential file needs to be updated with  aws_access_key_id and aws_secret_access_key. The aws config file is in C:\Users\user_profile_name\.aws\credentils. location to save file_ Give the location of you computer  to save the Excel file ex: D:\Snapshot Report\ Output Script ✔️ #--Get Snapshot Report ( Soretd with stated date)--# $cpmsnapshots = get-ec2snapshot -ProfileName "AWS_Profile_Name" -Region re...

Cloud-formation script to deploy work-space

This jason script for create  work-space in AWS . username . directory id  need to be passed as parameters. You  can select the available bundles from drop-down list. You can refer how to run cloud-formation stacks  on aws documentation.  { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "Amazon WorkSpaces Deployment Template. This template will deploy the resources needed to deploy a single Amazon WorkSpaces desktop.\n", "Mappings" : { "WSTypeMap" : { "Standard-Win10-Desktop" : { "BundleId" : "wsb-8vbljg4r6" } } }, "Parameters" : { "UserName" : { "Description" : "Your Windows login ID", "Type" : "String" }, "DirectoryID" : { ...

Recycle IIS app pools in EC2 instance on application load balances (Powers-hell script)

This is a power shell script which has written for recycle Windows IIS app pools in ec2 instances in load balances in aws. Basically script will recycle the windows iis app pool by  This script is doing multiple tasks and this can be use . 1. By giving the server names , script can be covert  names into instance ID's  ( server-name will be in EC2 tags  )   2. Script will record the instance ID and load balance name , before it has taken out of the ALB 3 . Script will remove specified servers from load balance and recycle specified app pool. then it will ask to leave the server  as it is or put it back to the ALB.

Install LDAP /SSL certificates in single/multiple Servers (Powershell script)

This is a script which will be helpful to install SSL/LDAP certificate in single or multiple servers. The verification is doing by comparing the certificate serial No. #--Script for install and verify LDAP certificates in web servers--# #--Last modified 3/29/2018 12:38 AM EDT--# #--Take the server list from the text file--# $servers = Get-Content -path "D:\Scripts\Approved Scripts\LDAP_Cert_ installation\servers.txt" #--Loop for retrive server and install/verify LDAP Certificate--# foreach ($server in $servers) { $Computername = $server $pfx = new-object System.Security.Cryptography.X509Certificates.X509Certificate2 #--Get the s=certificate path from user imput--# $certPath = read-host "Certificate Path" #--Install the provided LDAP certificate--# $pfx.Import($certPath) $CertStore = New-Object System.Security.Cryptography.X509Certificates.X509Store -ArgumentList "\\$($server)\root", "LocalMachine" $pfx_serialno...