PowerShell script to run application (with commands)

This topic contains 1 reply, has 2 voices, and was last updated by  Wilfredo Perez 2 years, 3 months ago.

  • Author
  • #36953

    J J

    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

    Wilfredo Perez

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

You must be logged in to reply to this topic.