I have a Windows machine with openssh-server running and I can execute commands through it. For example...
This works:
ssh vc-mgmt powershell -nologo -Command "get-vm"
This does not work:
ssh vc-mgmt powershell -nologo -Command "get-vm | get-snapshot"
Returns error:
'get-snapshot' is not recognized as an internal or external command, operable program or batch file.
If I open Powershell manually and run get-vm | get-snapshot
it works as expected.
My Question: How can I get the 2nd example to work?