PowerCLI: Technical Support Mode

Today Duncan over at yellow-bricks.com has started quite the conversation on technical support mode for ESXi or otherwise known as “unsupported mode”, check out his blog post and especially the comments here:  http://www.yellow-bricks.com/2010/03/01/disable-tech-support-on-esxi/

As always when I see a post my first thought is to PowerCLI, so how can it help in this instance, well apart from the obvious cmdlets which I mentioned in my earlier ESXi post, there are also a couple of one liners which can help us manage Technical Support mode.

To view all hosts and check to see if they have Technical Support mode enabled, use the following:

Get-VMHost | Where {$_.State -eq "Connected" -or $_.State -eq "Maintenance"} | Get-View | Where {$_.Summary.Config.Product.Name -match "i"} | Select Name, @{N="TechSuportModeEnabled";E={(Get-VMHost $_.Name | Get-VMHostAdvancedConfiguration -Name VMkernel.Boot.techSupportMode).Values}} | Out-GridView

image

To disable it on all ESXi hosts use the following:

Get-VMHost | Where {$_.State -eq "Connected" -or $_.State -eq "Maintenance"} | Get-View | Where {$_.Summary.Config.Product.Name -match "i"} | Get-VIObjectByVIView | Set-VMHostAdvancedConfiguration -Name VMkernel.Boot.techSupportMode -Value $false

And to enable it use the following:

Get-VMHost | Where {$_.State -eq "Connected" -or $_.State -eq "Maintenance"} | Get-View | Where {$_.Summary.Config.Product.Name -match "i"} | Get-VIObjectByVIView | Set-VMHostAdvancedConfiguration -Name VMkernel.Boot.techSupportMode -Value $true

Thanks to Duncan and his most excellent site for the constant source of script ideas 😉

5 thoughts on “PowerCLI: Technical Support Mode”

  1. I believe the attribute VMkernel.Boot.techSupportMode doesn’t exist on Esxi 4.1 Update 2+. If I am incorrect can someone let me know what the replace attribute is because I don’t have VMkernel.Boot.techSupportMode on an of my ESXi 4.1 Update 2 hosts.

    Thanks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.