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 6 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #36953
    Profile photo of J J
    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

    Profile photo of Wilfredo Perez
    Wilfredo Perez

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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.