Call Operator

noun

say it: “KAWL OP-uh-ray-ter” /ˈkɔl ˈɑpəˌreɪtɚ/

The & sign in PowerShell, which runs the command, script or program named after it, such as a program's path in quotes.

What is the call operator in PowerShell?

The call operator, &, tells PowerShell to run what comes after it. You need it when a program's path is in quotes, because a path in quotes on its own is only a piece of text. It also runs a command whose name is kept in a variable.

& 'C:\Program Files\Git\cmd\git.exe' --version   # git version 2.51.1.windows.1

In a sentence

  • “The call operator ran git from its full path in C:\Program Files.”
  • “Without the call operator, a path in quotes is only a piece of text.”

Level: Journeyman · More PowerShell terms at this level

Updated