Popular

AWS Volume ID from Instance Name Tag

NOTE – For this script to work your instances must have a unique name tag. I use this tag for machine host-names. This script is to identify all attached volume ID’s from a single instance Name Tag within AWS Powershell. The sections below describe the action of script sections Import AWS Powershell module (needs to […]

AWSCLi – Create Snapshot and Delete oldest snapshot for 1 Volume

This script was created by my brother Scott Prudence and I, this snapshot’s 1 specific volume then once the snapshot is completed the script then removes the oldest snapshot. This is a way of implementing a weekly snapshot of a single volume within AWS.   NOTE – Change the VOLUMEID variable from vol-xxxxxx to your volume ID […]

Format-List

Format-List is a very useful command throughout the Powershell based applications which I use every day. Command | Format-List This command gives you a list of all the attributes against the object you run it against. This is extremely useful if you are unsure on an attribute, see my example below where I want to know all the attributes […]

Recent Posts

AWSCLi – Create Snapshot and Delete oldest snapshot for 1 Volume

This script was created by my brother Scott Prudence and I, this snapshot’s 1 specific volume then once the snapshot is completed the script then removes the oldest snapshot. This is a way of implementing a weekly snapshot of a single volume within AWS.   NOTE – Change the VOLUMEID variable from vol-xxxxxx to your volume ID […]

AWSCLi Get Instances from List

This script is designed to run line by line of a text file containing EC2 Instance ID’s. I then Queried the results to only show the ID, Name and State (other properties can be added with ease). I also decided output to text was best for the results to be in human readable format. NOTE […]

Powershell to create IAM User

  This Powershell script is to create an IAM user, Add the user to an IAM group, Set the IAM user password with Reset required on login enabled and then Create Access keys for the user.   ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## Create IAM […]

AWS CLI Setup On Windows

Here is how I setup my AWS CLI on my Windows 7 machine. Download the CLI .MSI file AWS direct: https://aws.amazon.com/cli/ Run the MSI installation file (I install my CLI at C:\AWS for laziness when using the CLI) Open Command Prompt/Powershell Browse to your installed location and run aws –version PS K:\> cd C:\AWSCLi PS C:\AWSCLi> […]

Tag list on EC2 instance ID’s

This script was reuqired to tag a list of instance ID’s to change/add Service Owner tag. Please remember to confirgure powershell for AWS and also change the $tag.value variable   ######################################## ## Bulk Tag for Multiple Instances ## ## Ben Prudence – 07/09/2016 ## ######################################## ## Import-Module AWSPowershell ## Tag Details $tag = New-Object Amazon.EC2.Model.Tag […]

VMware find RDM Disks

This script identifies and exports RDM disks within the vCenter environment. Please remember to input the $vcenter variable and ensure the export path is valid. ######################################## ## Export RDM from vCenter ## ## Created By: Ben Prudence ## ## Created: 19/10/2015 ## ######################################## ## Variables $vcenter = xxxxvcenter01 ## Add VMware Snapin add-pssnapin VMware.VimAutomation.Core ## […]

Office365 License Change

This script was required by a company as they renewed there Microsoft agreement with different levels of O365 Licenses, replacing E1 and EO2 licenses with E3 and EMS. The script is padded out with outputs to the initiator to see what is going on. Sections are broken down as follows: Connect to Microsoft Online with […]

AWS Snapshot Backup for Instance Patching

NOTE – For this script to work your instances must have a unique name tag. I use this tag for machine host-names. The requirement for this script was to snapshot all volumes of a machine before deploying Windows updates to ensure a safe and quick rollback option. This script is to snapshot and tag all attached […]

AWS Volume ID from Instance Name Tag

NOTE – For this script to work your instances must have a unique name tag. I use this tag for machine host-names. This script is to identify all attached volume ID’s from a single instance Name Tag within AWS Powershell. The sections below describe the action of script sections Import AWS Powershell module (needs to […]

AWS Powershell Module

To use AWS powershell you will need to download and install the module form AWS. The link and install instructions are below. https://aws.amazon.com/powershell/ Once the module is installed you should be able to run Powershell as administrator and configure your powershell as below: Set AWS Credential Profile Set-AWSCredentials -AccessKey {AKIAIOSFODNN7EXAMPLE} -SecretKey {wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY} -StoreAs {ProfileName} Initialize-AWSDefaults […]