# PowerShell script to run application (with commands)

**URL:** <https://forums.powershell.org/t/powershell-script-to-run-application-with-commands/6064>\
**Category:** PowerShell Help\
**Created:** [March 24, 2016, 4:46am UTC](https://forums.powershell.org/t/powershell-script-to-run-application-with-commands/6064 "2016-03-24T04:46:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![j-j](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@j-j](https://forums.powershell.org/u/j-j)\
**Post date:** [March 24, 2016, 4:46am UTC](https://forums.powershell.org/t/powershell-script-to-run-application-with-commands/6064/1 "2016-03-24T04:46:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wilfredo-perez](https://avatars.discourse-cdn.com/v4/letter/w/e99b99/32.png) [@wilfredo-perez](https://forums.powershell.org/u/wilfredo-perez)\
**Post date:** [March 24, 2016, 6:30am UTC](https://forums.powershell.org/t/powershell-script-to-run-application-with-commands/6064/2 "2016-03-24T06:30:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:41pm UTC](https://forums.powershell.org/t/powershell-script-to-run-application-with-commands/6064/3 "2024-05-16T20:41:45Z")

</div>

Closed on May 16, 2024, 8:41pm UTC


