No Luck Trying to Run Command Line Program

Welcome Forums General PowerShell Q&A No Luck Trying to Run Command Line Program

Viewing 2 reply threads
  • Author
    Posts
    • #194021
      Participant
      Topics: 6
      Replies: 7
      Points: 71
      Rank: Member

      I have a – what I thought would be simple – script… but cannot figure out what I am doing wrong. It is a command line run of TeamViewer to change some account parameters…

      If I run the same command in a CMD window as Administrator it works as expected.

      Here is my PowerShell script:

      It does not help that there is no output from TeamViewer when you run this but it seems like it is not running.

      Help – please. Any thoughts?

      Thanks in advance!

      Paul.

       

    • #194027
      Participant
      Topics: 6
      Replies: 7
      Points: 71
      Rank: Member

      Ok – so I figured it out – I think…

      TeamViewer produces no output – which is bad…

      It turns out the argument

      should have been

      with dashes…

      Lesson learned – always make sure your programs produce output… shame on TeamViewer!

      Still would love any feedback on the code…

    • #194036
      Participant
      Topics: 13
      Replies: 1753
      Points: 3,136
      Helping Hand
      Rank: Community Hero

      The arguments parameter is a string array, so you can write your code like this:

      You can check the parameters:

Viewing 2 reply threads
  • The topic ‘No Luck Trying to Run Command Line Program’ is closed to new replies.