I am using Orchestrator 2016 with the reg change to make it use powershell 5.
In Powershell ISE, I run this simple query for a remote box to check the status of Windows updates via WMI:
$CCMUpdate = get-wmiobject -query "SELECT * FROM CCM_SoftwareUpdate" -namespace "ROOT\ccm\ClientSDK" -ComputerName '*computername*'
if(@($CCMUpdate | where { $_.EvaluationState -eq '2' -or $_.EvaluationState -eq '3' -or $_.EvaluationState -eq '4' -or $_.EvaluationState -eq '5' -or $_.EvaluationState -eq '6' -or $_.EvaluationState -eq '7' -or $_.EvaluationState -eq '8' }).length -ne 0) { $true } else { $false }
In ISE it returns the True or False as I would like, however, running it through a .NET activity in Powershell it doesnt return the True or false. I have $CCMUpdate as the publishedData on the .NET Activity.
What am I missing?
Thanks

