Powershell Command within batch file issues

Welcome Forums General PowerShell Q&A Powershell Command within batch file issues

Viewing 2 reply threads
  • Author
    Posts
    • #276894
      Participant
      Topics: 2
      Replies: 8
      Points: 39
      Rank: Member

      Hello Folks –

       

      I hope all is well!  I have the following powershell code within a ps1 script that is working just fine:

      However, I want to be able to execute the code directly within batch.  I was able to get it to execute, however it’s not recognizing my exit command:

      What am I doing wrong?  Thank you!

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

      What is the ^ here ? Can you try saving this as a ps1 file and call that ps1 via batch file.

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

      What is the ^ here ? Can you try saving this as a ps1 file and call that ps1 via batch file.

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