Gather Elastic status output into Powershell to query

Comments

2 comments

  • Colby Bouma

    Something like this?

    Set-Location 'C:\Program Files\Elastic\Agent'

    $AgentJson = elastic-agent.exe status --output json | ConvertFrom-Json

    $AgentJson.Applications | Select-Object 'Name', 'Status'
    1
    Comment actions Permalink
  • Chad Eldridge

    I was far over-complicating this.  Your command works perfectly.  Thank you

    0
    Comment actions Permalink

Please sign in to leave a comment.