Skip to content
Advertisement

Tag: powershell-core

Powershell for Linux: Combining commands with pipe sign doesn’t work

Any way to concatenate commands in Powershell for Linux? This is what I’m trying to run: pwsh -Command Invoke-ScriptAnalyzer -Path . | ConvertTo-Json | Out-File -FilePath “/home/administrator/scripts/test.json” So, run the Invoke-ScriptAnalyzer, convert the results to Json and save the result to test.json. It doesn’t recognize anything after the | sign: ./test.sh: line 1: ConvertTo-Json: command not found ./test.sh: line 1:

Advertisement