How to get the results of LS into a variable
I want to automate the following:
How can I accomplish this?
- Open my defined site
- Run
ls
—which is a supported command—and have the output from it go to a variable, a file, *anything* that I can then read back into the next step of my PowerShell script.
ls
is working just fine, but there's no obvious way to capture the output.
How can I accomplish this?