VMware

John Tuffin's Blog

John Tuffin's Personal Log about E-Learning Course Development

Previous Next
0

Query ESX Time

Posted by cpqarray May 14, 2008

If you're not reading the forum for the VMware VI Toolkit Beta you are missing out on just a goldmine of useful information. Take this post from LUCD. This will allow you to query the ESX host for it's current time. This another one of those instances where there is no applet in the toolkit to do this so you hook into the API to get the information.

Get-VIServer -Server <Replace with yourServer Name>

http://Reflection.Assembly::LoadWithPartialName("vmware.vim")

$svcRef = new-object VMware.Vim.ManagedObjectReference

$svcRef.Type = "ServiceInstance"

$svcRef.Value = "ServiceInstance"

$serviceInstance = get-view $svcRef

$datetime = $serviceInstance.ServerClock

*
Write-Host $datetime

*



There are no comments on this post

Click to view cpqarray's profile Member since: Nov 24, 2005

John Tuffin's Personal Log about E-Learning Course Development

View cpqarray's profile

Communities