Redirection

noun

say it: “ree-dih-REK-shun” /ˌridɪˈrɛkʃən/

Sending a command's output into a file instead of the screen in PowerShell: > replaces the file and >> adds to its end.

What is redirection in PowerShell?

Redirection sends what a command would print into a file instead. >, read "into", replaces the file with the output; >>, read "add to", adds it to the end. Behind both is Out-File, so the file holds the output exactly as it would look on screen.

Get-ChildItem hallway > hallway-list.txt

In a sentence

  • “One arrow or two: in redirection, > replaces the file and >> adds to it.”
  • “With redirection, Sam saved the folder's list into hallway-list.txt.”

Level: Novice · More PowerShell terms at this level

Updated

In other subjects