$eCerts = Get-ChildItem -Path cert:\LocalMachine -Recurse -ExpiringInDays 90
Write-Host "Statistic:" $eCerts.Count
Write-Host "Message:" $eCerts.SerialNumber $eCerts.NotAfter $eCerts.Subject
Exit 0
Above is the script which runs fine and returns expected results in the script editor and on the remote server. Testing is 100% successful.
The issue is that the statistic field shows a zero and not 1 as the script result shows. Message shows the three fields fine.
Component monitor platform is set to x64. Valid credentials in place. Execution Mode: Remote Protocol: HTTP
Under Script Output
SAM Version is 6.6.0