Hello,
Anyone know how to use Powershell to check/override BES Client status on local computer? or alternative ways/location like WMI, registry, etc
I need to check the patching status (Completed, Pending Restart, Fail, Disk Limit Issue, etc)
Hello,
Anyone know how to use Powershell to check/override BES Client status on local computer? or alternative ways/location like WMI, registry, etc
I need to check the patching status (Completed, Pending Restart, Fail, Disk Limit Issue, etc)
Are you saying that you want to run a powershell script to check the status of a job in BigFix? If so, you would need to use the RestAPI of BigFix and run some kind of session relevance like - here is PS snipet that I’ve written:
$UserName = "..."
$Password = "..."
$password_base64 = ConvertTo-SecureString $Password -AsPlainText -Force
$global:creds = New-Object System.Management.Automation.PSCredential ($UserName, $password_base64)
$global:headers = @{ "X-Requested-With" = "powershell" }
$global:relevance = "(status of it) of results whose (name of computer of it = `"$env:computername`") of bes actions whose (name of it = `"some name`")"
$global:relevance = $global:relevance -replace '"', '%22'
$global:relevance = [system.net.webutility]::UrlEncode($global:relevance)
$results = $(Invoke-RestMethod -Headers $global:headers -Uri "https://bigfix.fqdn.ext:52311/api/query?relevance=$global:relevance" -Method get -ContentType 'application/xml' -Credential $global:creds).BESAPI.Query.Result.Answer.'#text'
Rest API if one of the method. I am interested to use PowerShell and running on local computers. I am not sure where and how to read the BES Client Agent status, or maybe it is stored somewhere in local machine before send the state back to bigfix server. Maybe, WMI, Registry. Not sure.
I am not aware anywhere stored locally. The whole idea of action status is that the agent to evaluate it dynamically and report it up-to the root server, and data is stored in the database. Why would the agent be keeping redundant data that was already reported and stored on the root server locally too…? It just makes no sense, does it?