Health check failiure - Win32_OperatingSystem

One of our agents is failing its health check with an error

Get-WmiObject : Invalid class "Win32_OperatingSystem"
At C:\Octopus\Work\20200223121620-183328-915\Bootstrap.ps1:77 char:9 
$OS = Get-WmiObject -class Win32_OperatingSystem 
CategoryInfo          : InvalidType: (:) [Get-WmiObject]

Pretty sure this is a Windows issue, but wondered if it had been encountered before. Any guidance appreciated.


Hi @Chris_Tamlyn,

Thanks for getting in touch! I had a look and I do believe this is an environmental Windows issue. The account running the Octopus Server / Tentacle service is responsible for executing any scripts during a deployment or task. It looks like it’s either not able to find the Win32_OperatingSystem class or it’s somehow corrupted.

You can try executing these commands manually using the account running the Octopus service to test this and rule out Octopus as a potential cause.

If you need any further help with this or have any further questions at all, please don’t hesitate to let me know.

Best regards,