Category Archives: Scripting

Powershell/ESXCLI – EMC VPLEX changing multipathing policy

By | May 7, 2012

When connecting some storage systems to vSphere, vSphere sometime doesn’t select the most optimal multipathing policy. I came across the above problem when adding an EMC VPLEX storage system to a  large vSphere 4.1 installation. vSphere selected the Fixed path multipathing policy. In smaller environments this isn’t normally a problem , but when a Fixed policy is selected in… Read More »

VMware vSphere PowerCLI Reference – Book

By | September 4, 2011

If you haven’t read or read about the must have PowerCLI book “VMware vSphere PowerCLI Reference: Automating vSphere Administration“, by Luc Dekens, Alan Renouf, Glen Sizemore, Arnim van Lieshout and Jonathan Medd, then you need to check it out. The book will show you how to automate your VMware infrastructure from vCenter to VM’s. Automate… Read More »

Poor man’s hostprofiles including ESX deployment

By | May 16, 2011

Last year I was asked to reduce the time spend on installing and configuring our ESX hosts.  Because we weren’t using Enterprise Plus licenses, we didn’t have Host Profiles. I came up with a simple two-step process based on the EDA appliance and a custom PowerShell script. Install the host from PXE. Only setting the… Read More »

Changing the virtual videocard settings

By | May 6, 2011

Some time ago I was asked to create a script that could list each VM’s videocard settings. As you could see that was quite simple. I using the Get-View -ViewType to speed up the query – See LucD’s post on http://communities.vmware.com/message/1511671#1511671 for more info. Then I was asked to set all VM’s videocard setting to… Read More »

Powershell – Check if a service is running

By | June 22, 2010

If you ever have experienced that after your vCenter server reboots – due to Windows updates, the “VMware VirtualCenter Server” service is not starting? I have seen it a few times and every time it’s during a weekend 🙁 So to make sure your vCenter service (or other) is always running you could use this… Read More »

Powershell – Configure NTP server list

By | June 17, 2010

If you want to configure a hosts NTP server list through PowerCLI you have a few cmdlet at your disposal. Get-VMHostNtpServer Remove-VMHostNtpServer Add-VMHostNtpServer Get-VMHostService Set-VMHostService Get-VmhostFirewallException Restart-VMHostService Get a list of NTP servers on a host. To remove a specific NTP server from a host NTP server list. To remove all NTP servers on a… Read More »

Playing with the vRanger 4.5 vAPI (Powershell :-))

By | June 22, 2010

Since Vizioncore came out with vRanger 4.x, last year, I been working on porting the VBS script “vRanger Script version 2.0” to Powershell. During this time I have found several bugs/missing functionality in the vAPI. Vizioncore have corrected the bugs with new releases of vRanger. The first vRanger version where all vAPI cmdlets worked in… Read More »

Smart and simple backup script with PowerCLI

By | May 24, 2010

A friend on the Danish VMUG pointed me towards this simple backup script, from GestaltIT.com. http://gestaltit.com/all/tech/virtualization/simon/vmware-backup-powercli-script/ The script creates a snapshot of a VM (from a CSV file) and creates a Thin Provisioned clone based on the snapshot, on a specified datastore (from the CSV file). This a smart and simple way to create a… Read More »