VMware Cloud Community
chall32
Enthusiast
Enthusiast
Jump to solution

Query tools.syncTime Setting Using PowerCLI

Hey,

I have a 5.5 vCenter full of VMs that I need to test compliance with KB1189 - Disabling Time Synchronization

Using Get-AdvancedSetting I can test and receive results for all settings except "tools.syncTime".  Is there a way to query this setting?

Thanks

Tags (2)
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

There is in fact no need to perform an additional Get-View, you can do

Get-VM | Select Name,@{N='TimeSync';E={$_.ExtensionData.Config.Tools.syncTimeWithHost}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

3 Replies
Sivaramsharmar
Enthusiast
Enthusiast
Jump to solution

Try like this,

Get-VM | select Name,@{N='SyncTimeWithHost';E={($_ | Get-View).config.tools.synctimewithhost}}

LucD
Leadership
Leadership
Jump to solution

There is in fact no need to perform an additional Get-View, you can do

Get-VM | Select Name,@{N='TimeSync';E={$_.ExtensionData.Config.Tools.syncTimeWithHost}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

chall32
Enthusiast
Enthusiast
Jump to solution

Excellent, thanks Sivaramsharmar and LucD!

I had spotted syncTimeWithHost although I hadn't realised it was the same as tools.syncTime

Thanks again

Reply
0 Kudos