title: Execute Powershell command over SSH
body: <p>Tried following command from Ubuntu host to Windows client over Cygwin/OpenSHH.</p>
  
  <pre><code>ssh  USER@HOSTNAME  powershell -Command "&amp; {Get-Host}"
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Cannot process the command because of a missing parameter. A command must follow -Command.
  </code></pre>
  
  <p>However when i tried the same command over cygwin in windows client i get proper output.</p>
  
  <pre><code>$ powershell -Command "&amp; {Get-Host}"
  Welcome to Powershell augmented with NaviNet tools.
  Bootstrapped ScmToolsProjectConfiguration.
  
  
  Name             : ConsoleHost
  Version          : 2.0
  InstanceId       : 0b2e578e-50b9-42ab-a07c-0c4ef762ba0c
  UI               : System.Management.Automation.Internal.Host.InternalHostUser
  CurrentCulture   : en-US
  CurrentUICulture : en-US
  PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
  IsRunspacePushed : False
  Runspace         : System.Management.Automation.Runspaces.LocalRunspace
  </code></pre>