PS C:\util> $logLevel = Get-AdvancedSetting -Entity $global:DefaultVIServer -Name 'log.level'
PS C:\util> Set-AdvancedSetting -AdvancedSetting $logLevel -Value 'verbose' -Confirm:$false
Name Value Type Description
---- ----- ---- -----------
log.level verbose VIServer Logging level
PS C:\util> .\alarmv3.ps1
Exception calling "ReconfigureAlarm" with "1" argument(s): "A specified parameter was not correct: "
At C:\util\alarmv3.ps1:45 char:1
+ $alarm.ReconfigureAlarm($spec)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
PS C:\util> $log = Get-Log -Key 'vpxd:vpxd.log'
PS C:\util> $log.Entries | Out-File -FilePath .\vpxd.log
PS C:\util> Set-AdvancedSetting -AdvancedSetting $logLevel -Value $logLevel.Value -Confirm:$false
Name Value Type Description
---- ----- ---- -----------
log.level verbose VIServer Logging level
what I ran