Hi I hope someone can point me in the right direction. I have a custom ohai plugin that I am using to gather some information about our windows servers. I have been directed to have ohai use a powershell script to gather the information. I am struggling to figure out how to get the local powershell script to return the value back to ohai for reporting purposes
Here is what I have so far:
collect_data do powershell_script 'Get HyperV Networks' do hypervnetworks = code '. c:/scripts/Get-HyperVNetworks.ps1 | ConvertTo-Json' end hyperv_server[:hypervnetworks] = hypervnetworks end
but I don't think this will work. Thoughts?