...hopefully some useful VMware related stuff

PowerShell

23/08/2012 17:00

ESXi 5 - PowerShell Host Setup Script

Use this script to configure a freshly installed ESXi 5 host Requires PowerCLI (tested / developed on PowerCLI 5 against ESXi 5 and 5 update 1 Hosts) A series of parameters like iSCSI Target addresses are manually entered to the script, the rest, including host name and specific vmkernel...
06/01/2011 10:00

Initial ESXi Setup Script

Automates the initial setup of an ESXi host after first installation and IP addressing.   First connects to ESXi host   NETWORKING: Adds second vmnic to vSwitch0 Creates a second vSwitch (vSwitch1) with port group LAN and assigns 4 vmnics to it Moves all VirtualMachines if exist to LAN...
09/10/2010 23:00

Script to list local and removable disk usage

This script uses the wmi object of win32_logicaldisk and outputs to a table that displays free space on both local and removable disks and percent free. The output is shown next and script below:     SCRIPT:   $diskarray = gwmi win32_logicaldisk | where {$_.Size -gt 0} $diskobject =...
06/07/2010 21:00

Script to identify Inactive Active Directory User Accounts for an AD 2003 domain

Get all Active Directory users in the domain, pick out firstly User accounts which have never logged in and second get the last logged in time for each account which have logged in and report back any accounts which haven't logged in within the last 31 days. Couldn't find PowerShell cmdlets for...
21/06/2010 00:00

NetApp change Snapmirror replication throttling script

Wrote this script to get round an issue at a customers site with the Snapmirror replication taking too much of the bandwidth across a LES link. Because I wanted to enable and disable as well as report on the status of replication throttling I put all variants into the one script. There are 4 main...
19/06/2010 12:00

NetApp filer Aggregate space used by Volumes report

To avoid over-committing storage it is essential to know how much space you have assigned to volumes on your aggregates. If you just run an aggregate list, the amount of space shown as used and free doesn't equal the actual amount used. The script below creates a table showing Filer, the aggregate...
08/06/2010 22:00

NetApp Snapmirror Status - Email Report

PowerShell Script to Email a report of the status of Snapmirror Replication on your NetApp filers. The Script uses the PoSh OnTap Module downloadable from https://poshontap.codeplex.com/ which gives masses of NetApp PowerShell commands.   Download script HERE is also below the...
25/05/2010 12:00

Datastore Information script showing ESX and datastore name paths and multipathing settings

A great script by LucD on the VMware community forums: https://communities.vmware.com/thread/269695 Download HERE   - - - - - - - - - - - - - - - - - - - - # Script to Show Datastore Info (Multipathing etc.) # LucD $report = @() Get-VMHost  | Get-View | %{  $esx =...
20/05/2010 12:00

Display memory allocated and memory available across environment

Script displays total memory available in each cluster, total memory allocated to VMs in each cluster and a percentage allocated. If over 100% message stating over-commitment is present. Then a table for each host in the cluster and same items as above is displayed.   The script can be run...
17/05/2010 12:00

Display number of vCPUs assigned and vCPU to Core ratio

Script displays Overall number of Cores available over all hosts, then the number of Virtual CPUs assigned and then the ratio.   The script can be run from a standard PowerShell window, as it checks for the VMware snapin and loads if necessary. If no connection exists to vCenter server it will...