My little cloud in the virtual world of virtualisation – mainly VMWare and EMC SAN (CX, NS and VNX)
Show MenuHide Menu

Tag: Powershell

Setting time on ESXi hosts through PowerCLI | Geaux Virtual

4 November, 2013

Excellent powershell to set the correct time on a number of hosts…

I expanded the code to:

Get-Cluster -Name “Cluster” | Get-VMHost | Where-Object {

$t = Get-Date
$dst = $_ | %{ Get-View $_.ExtensionData.ConfigManager.DateTimeSystem }
$dst.UpdateDateTime((Get-Date($t.ToUniversalTime()) -format u))
}

via Setting time on ESXi hosts through PowerCLI | Geaux Virtual.

vSphere ESXi Maintenance Mode with PowerCLI | Virtual Drive

4 November, 2013

Good code snippets for vmware host maintenance mode.

 

vSphere ESXi Maintenance Mode with PowerCLI | Virtual Drive.

PowerCLI: Remove all vmnics from a vSwitch — DAMIAN KARLSON

4 November, 2013

Hand tip on how to remove pNics from a vSwitch

 

 

$nic = @

via PowerCLI: Remove all vmnics from a vSwitch — DAMIAN KARLSON.

VMware: Add PortGroup to all hosts in cluster with PowerCLI | VMpros

22 April, 2013

Very usefull and time saving script – found over on blog site VMPROS.

Many Thanks.

Get-Cluster “My Cluster” | Get-VMHost | Get-VirtualSwitch -Name “vSwitch0″ | New-VirtualPortGroup -Name “MyPortGroupName” -VLanId 1234

via VMware: Add PortGroup to all hosts in cluster with PowerCLI | VMpros.