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 […]

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 […]

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 […]

Recent Posts

Find AD User Password Last Set

This one liner was used when the password age group policy was reduced. It caused a massive amount of users not being able to login due to the password expiry policy now in place. We needed to find the password age so we used the PasswordLastSet attribute on each AD User to export to s […]

AD User Group Copy

This Script was designed for a Service Desk Analyst to run. The AD user was already created and required the same AD groups as another user in the domain. This script exports the groups and adds them to the other user. NOTE – This script does not overwrite existing groups.  Below is an index of […]

Show Empty AD Groups

This script was found on the following site and very useful for me when consolidating an Active Directory forest: https://nidhinck.wordpress.com/2013/07/23/find-empty-groups-in-active-directory-using-powershell-script/ The script can be run from a normal Powershell window or with the Windows Powershell with AD Modules installed already (If you are using the AD Shell please delete the first line of this script) […]

VM Uptime Script

This is a script to show the uptime of a VM in the Virtual estate. I have put a few different variations of this Script to meet the needs I had. The script below has is the original script I found on the following site: http://vmware-scripts.blogspot.co.uk/2012/08/script-to-get-uptime-of-each-vm-in.html $LastBootProp = @{   Name = ‘LastBootTime’     Expression […]

Show VM, Host, Cluster and Datacenter

This one line script is the first thing I do when joining a company to give me an overview of what is out there in the vCenter estate. It shows a VM against its Host, Cluster and Datacenter, we all know these can change with DRS and sDRS but as I say its a great […]

Get-Snapshot

As the command says this command shows you all the information you would like to know about Snapshots! Very useful for putting this command into a scheduled task and receiving an email form it reporting on your Snapshots. Starting from the top, the command can not be run on its own. It needs information to […]

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 […]

Get-Member

Get-Member is a very useful command throughout the Powershell based applications which I use every day. اسرار البلاك جاك Command | Get-Member This command gives you a list of all the attributes against the method type and the definition. This is extremely useful if you are unsure on an attribute, see my example below where I want to […]

Connecting PowerCLI

Want to use VMware PowerCLI to get some information or perform a script? First things first, you have to connect the application to something. Now the choice is up to you, a Host or a vCenter server? I would always go with the vCenter server as you can specify specific hosts but its up to […]