A. Mikkelsen

VMware ESX scripts, commands, tools and other nice to know things that will make your virtualization days easier!!!!

Browsing Posts in PowerShell

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

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

If you have your hosts connected to a Cisco network infrastructure, you can see a hosts CDP information directly from within the VI Client. As you can see in the exampels below it’s quite impossible to get the full CDP picture if you have many hosts with multiple NICs. So I created a script that […]

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

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

September 15, 2010 VMware released version 2.0 of its Project Onya Alpha. You can download and read more about Project Onyx on the projects home page. http://communities.vmware.com/community/vmtn/vsphere/automationtools/onyx?view=overview This project is a must have for all PowerCLI geeks 🙂

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

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

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

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