PowerShell script to run application (with commands)

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Wilfredo Perez Wilfredo Perez 8 months, 2 weeks ago.

  • Author
    Posts
  • #36953
    Profile photo of J J
    J J
    Participant

    Hi all... I am trying to run an application from C:\Program Files\APP\app.exe with the application built in commands. When I run from the command prompt, I can get the result I wanted. But I would like to use the script which will check other components of servers along with this one to avoid running this command manually. I tried both of below mentioned scripts & I am not getting any output...any suggestions, pls let me know...

    $Output = "C:\Information.txt"
    Start-Process -FilePath "C:\Program Files\APP\app.exe" -ArgumentList "query mgmtclass" | Out-File $Output

    $Output = "C:\Information.txt"
    Start-Process -FilePath "C:\Program Files\APP\app.exe" -PipelineVariable "query mgmtclass" | Out-File $Output

  • #36955
    Profile photo of Wilfredo Perez
    Wilfredo Perez
    Participant

    The exe should have a place to capture the install like a log file.

You must be logged in to reply to this topic.