BGP Peering NSX Tier-0 with Ubiquiti UDM Pro -…

BGP Peering NSX Tier-0 with Ubiquiti UDM Pro -…

After several months, attempts, and VCF rebuilds to get BGP peering with VMware Cloud Foundation, NSX, and my Ubiquiti Unifi network, it finally happened. I wanted to share my experience. This required a lot of help from internal rock star TAMs in our organization, external blogs, […]


Broadcom Social Media Advocacy

How to Suppress ESXi Shell Warnings with PowerCLI

If you’re managing VMware environments, you might occasionally run into persistent shell warning alerts in your ESXi hosts. Thankfully, you can quickly find and suppress these warnings with a bit of PowerCLI magic.

Check for ESXi Hosts with Shell Warnings

Show the actual advanced settings on all hosts. Log into vCenter using PowerCLI and run this command:

 Get-VMHost | Get-AdvancedSetting | Where-Object { $_.type -eq 'VMHost' -and $_.name -eq 'UserVars.SuppressShellWarning' } | Format-Table entity, name, value

Command output:

Entity                Name                          Value
------                ----                          -----
...
fs-vsan-04.int.dc5.cz UserVars.SuppressShellWarning     1
fs-vsan-05.int.dc5.cz UserVars.SuppressShellWarning     0
...


Check which ESXi hosts haven’t suppressed the shell warning (default). Then run the following command:

 Get-VMHost | Get-AdvancedSetting | Where-Object { $_.type -eq 'VMHost' -and $_.name -eq 'UserVars.SuppressShellWarning' -and $_.value -ne 1 } | Format-Table entity, name, value

This command outputs a table listing all hosts where the shell warning hasn’t been suppressed—it remains visible in the GUI.

Command output:

Entity                Name                          Value
------                ----                          -----
fs-vsan-05.int.dc5.cz UserVars.SuppressShellWarning     0

Suppress the Shell Warnings

Now, to suppress the shell warnings on selected ESXi hosts, run this simple command:

$esxi="fs-vsan-05.int.dc5.cz"
Get-VMHost $esxi| Get-AdvancedSetting | Where-Object { $_.type -eq 'VMHost' -and $_.name -eq 'UserVars.SuppressShellWarning' -and $_.value -ne 1 } | Set-AdvancedSetting -Value 1 -Confirm:$false | Format-Table entity, name, value

This command immediately disables the shell warnings on selected hosts. No more alerts in GUI!

Command output:

Entity                Name                          Value
------                ----                          -----
fs-vsan-05.int.dc5.cz UserVars.SuppressShellWarning     1

Why (Not) Suppress Shell Warnings?

It’s important to note that suppressing shell warnings is only advisable in lab or non-production environments. In production environments, shell warnings provide valuable security reminders. Always keep shell warnings enabled to maintain security awareness unless you’re working in a controlled test environment.

Happy scripting!

VCP-VCF with VMUG Advantage now ready to unlock…

Looking for your Home Lab Licenses to run either vSphere Standard Edition or VCF? This article should give you what you need to know to make this happen. VCP-VCF with VMUG Advantage now ready to unlock vSphere Standard Edition or VCF!

VCP-VCF with VMUG Advantage now ready to unlock…

Looking for your Home Lab Licenses to run either vSphere Standard Edition or VCF? This article should give you what you need to know to make this happen. VCP-VCF with VMUG Advantage now ready to unlock vSphere Standard Edition or VCF!


Broadcom Social Media Advocacy