The difference between call operator & and Start-Process

Welcome Forums General PowerShell Q&A The difference between call operator & and Start-Process

Viewing 1 reply thread
  • Author
    Posts
    • #275697
      Participant
      Topics: 15
      Replies: 13
      Points: 83
      Rank: Member

      I do not understand what is the difference between

      and

       

      Can one please explain it with an example. And is call operator & from Powershell or Docs.

      Thanks alot.

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

      The call (&) and Invoke-Expression are used to execute something, basically run it. See the Call Operator here:

      https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-7.1

      Start-Process provides a more parameter based approach with functionality such as waiting for completion to get exit codes rather than just starting a process. There are examples included in the documentation.

      • #275715
        Participant
        Topics: 15
        Replies: 13
        Points: 83
        Rank: Member

        Many thanks for the rich info.

        • This reply was modified 1 month, 2 weeks ago by Majd.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.