VMware Cloud Community
Redhatcc
Enthusiast
Enthusiast

Configure SSL for NFC (STIG) script

So this one is throwing me for a loop. Right now we have tons of ESXi 5.5 host that need the setting at "Administration >> vCenter Server Settings >> Advanced Settings" for "config.nfc.useSSL = true" to be set. However, I can't find anything as far as a powercli command or script that would accomplish that.

If I could have the one liner to set this value that would be a huge help! I can put together the rest of the loops and reading from a text file etc. Here is some more info: Verify that SSL Certificate Validation Over Network File Copy Is Enabled 

Thanks in advance! Huge help!

Tags (4)
0 Kudos
1 Reply
LucD
Leadership
Leadership

Can you try like this?

$name = 'config.nfc.useSSL'

$value = $true

$nfc = Get-AdvancedSetting -Entity $global:DefaultVIServer -Name $name

if($nfc){

    Set-AdvancedSetting -AdvancedSetting $nfc -Value $value -Confirm:$false

}

else{

    New-AdvancedSetting -Entity $global:DefaultVIServer -Name $name -Value $true -Confirm:$false

}


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

0 Kudos