Change NIC speed and duplex setting to AUTO in ESX4 using PowerCLI


When you install VMware ESX 4 by using the default installation method from for example the DVD, the NIC speed  and duplex setting are set to fixed for each NIC. This means that the network switch port must be set to fixed too. In VMware ESX 3 the default NIC mode was Auto Negotiate In the vCenter clients this looks like:


You can easily change the NIC speed and duplex settings to auto Negotiate for all NICs in the ESX host by using PowerCLI. This can be done by using the  following one-liner: 

Get-VMHostNetworkAdapter | Set-VMHostNetworkAdapter –AutoNegotiate

Be sure when you execute this command in production environment, that the VMware ESX hosts is in maintenance mode!



VMworld Europe 2009


I’m  ready for VMworld 2009. I packed my clothes, charge the telephone, laptop, photo camera and the MP3 player.

I go with two colleagues from our company, we fly on tomorrow (Monday) from Rotterdam (The Netherlands) 10.50. 

I have made a personal list with the session (and meetings/parties) who got my interest. There are lot interesting hands-on labs but the are not on the session list .



I try to blog from VMworld, if i have some spare time :-).

Powershell Windows Eventlog script

This week i found the report-events Powershell script (see figure 1). The script is made by Jeffrey Hicks. It generates a nice HTML file with errors and warnings from the Windows eventlog.


figure 1. Output reports-event script

You can specify multiple servers in a text file, select how many hours from the current time to look in the eventlog and e-mail the HTML file after generation. 

The following syntax can be used:

get-content c:\script\servers.txt | c:\scripts\report-event.ps1 – report c:\script\eventlog.html –hours 48 –smtp –sendto –from


get-content c:\script\servers.txt, text file containing the server names

– report c:\script\eventlog.html, name of the HTML file

| c:\scripts\report-event.ps1, call the actually script

–hours 48, hours to report from the curren time

–smtp SMTP server to sent the HTML rapport 

–sendto, To address

–from . from address


Schedule this script to run frequently to watch your eventlogs!


Download the script here.