Output a script to a text file

Welcome Forums General PowerShell Q&A Output a script to a text file

Viewing 1 reply thread
  • Author
    Posts
    • #272059
      Participant
      Topics: 4
      Replies: 4
      Points: 44
      Rank: Member

      This is the bottom part I have above.

      • This topic was modified 2 weeks ago by kvprasoon. Reason: Code formatting https://powershell.org/forums/topic/guide-to-posting-code-2/
    • #272080
      Senior Moderator
      Topics: 9
      Replies: 1420
      Points: 5,280
      Helping Hand
      Rank: Community MVP

      You cant just use only Out-File like that way. It has to be either connected to the output of a file or you have to pass the the input using -InputObject parameter. Its normally used by connecting to the output of another cmdlet using pipe |

      • This reply was modified 2 weeks ago by kvprasoon. Reason: Post correction
Viewing 1 reply thread
  • You must be logged in to reply to this topic.