small ps script

Welcome Forums General PowerShell Q&A small ps script

Viewing 3 reply threads
  • Author
    Posts
    • #280653
      Participant
      Topics: 1
      Replies: 1
      Points: 15
      Rank: Member

      I am trying to ask to do a small PS argument that will open a CMD.exe then run a file within the CMD.exe c:\program files\testapp\testappdiagnostic.exe /p

      all within the CMD shell because the diagnostic brings up a result matrix which i need. all of this does not need any elevation it can run within user creds context

      Any help is appreciated

       

    • #280797
      Senior Moderator
      Topics: 9
      Replies: 1449
      Points: 5,426
      Helping Hand
      Rank: Community MVP

      I am trying to ask to do a small PS argument

      Didn’t get you here, are you trying to create a script ?

    • #280806
      Participant
      Topics: 1
      Replies: 1
      Points: 15
      Rank: Member

      yes need help in doing so …

    • #280860
      Participant
      Topics: 17
      Replies: 1951
      Points: 3,988
      Helping Hand
      Rank: Community Hero

      Take a look at Start-Process. You do not need to use CMD, just execute the EXE:

      https://stackoverflow.com/questions/651223/powershell-start-process-and-cmdline-switches

      Also, you may want to try a shot in the dark too and search ‘Powershell testappdiagnostic.exe’. The best solution would be there is an alternative Powershell solution, if not someone may have already posted something to run the exe and\or parse the output.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.