This function is a wrapper for the Invoke-SSH cmdlet which is included in the Netcmdlets package. I don’t care for its output or syntax complexity, so I made this to suit my needs.
Usage:
Invoke-SSH <server> <PSCredential> [$true|$false] <command>
Example:
PS > Invoke-SSH myserver $root ‘ls /’ | select -first 3
root@myserver # ls /
bin
boot
dev

Cool.