VMware Cloud Community
ekrejci
Enthusiast
Enthusiast
Jump to solution

how to change advanced settings with PowerShell?

Hello,

someone know how to change advanced settings like "Disk.PathEvalTime" ?

many thanks

Eric

0 Kudos
1 Solution

Accepted Solutions
hugopeeters
Hot Shot
Hot Shot
Jump to solution

Hi Eric,

Try this approach:

$SI = Get-View $ServiceInstance

$OM = Get-View $SI.Content.Setting

  1. Query the option:

$OM.QueryOptions('Disk.PathEvalTime')

  1. Change the option:

$OM.UpdateOptions( ... )

Still working on the syntax of the UpdateOptions method

UPDATE: Ah, found it!

$newOption = New-Object VMware.Vim.OptionValue

$newOption.Key = 'Disk.PathEvalTime'

$newOption.Value = 300

$OM.UpdateOptions($newOption)

Message was edited by: hugopeeters

View solution in original post

0 Kudos
2 Replies
hugopeeters
Hot Shot
Hot Shot
Jump to solution

Hi Eric,

Try this approach:

$SI = Get-View $ServiceInstance

$OM = Get-View $SI.Content.Setting

  1. Query the option:

$OM.QueryOptions('Disk.PathEvalTime')

  1. Change the option:

$OM.UpdateOptions( ... )

Still working on the syntax of the UpdateOptions method

UPDATE: Ah, found it!

$newOption = New-Object VMware.Vim.OptionValue

$newOption.Key = 'Disk.PathEvalTime'

$newOption.Value = 300

$OM.UpdateOptions($newOption)

Message was edited by: hugopeeters

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Have a look at .

It shows how to change settings with values and those with check boxes.


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