Capturing Linux Output

by Dec 21, 2016

If you run PowerShell on Linux, you can combine Linux and PowerShell commands. To take the output of a Linux command and assign it to a PowerShell variable, do something like this:

$content = (ls)

Note that “ls” is an alias on Windows systems but refers to the original ls command on Linux systems.

Twitter This Tip! ReTweet this Tip!