title: how to "sudo root" with posh-ssh (powershell)
body: <p>i am using <a href="https://github.com/darkoperator/Posh-SSH" rel="nofollow">posh-ssh</a> to connect to my ssh server do some commands start with <strong>su root</strong>,but i can not switch user to root sucessfully.</p>
  
  <pre><code>PS C:\&gt; $rootpwdSec = ConvertTo-SecureString $rootpwd -AsPlainText -Force
  PS C:\&gt; Invoke-SSHStreamExpectSecureAction -Command 'su ' -ExpectString 'Password:' -SecureAction $rootpwdSec -ShellStream $stream
  True
  PS C:\&gt; $stream.read();
  
  [root@aaaaaa-test admin]#
  PS C:\&gt; Invoke-SSHCommandStream  -SessionId $SessionId -Command 'id'
  uid=500(admin) gid=500(admin) groups=500(admin) context=user_u:system_r:unconfined_t
  PS C:\&gt;
  </code></pre>
  
  <p>how can run my command as root?</p>