title: qwinsta /server:somesrv equivalent in Powershell?
body: <p>When I run the <code>qwinsta /server:somesrv</code> command in <code>cmd</code> I can get a listing of all the current RDP sessions that are logged into a particular Windows server.  </p>
  
  <pre><code> SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
   console                                     0  Conn    wdcon
   rdp-tcp                                 65536  Listen  rdpwd
   rdp-tcp#594       tom1                      1  Active  rdpwd
   rdp-tcp#595       bob1                      2  Active  rdpwd
  </code></pre>
  
  <p>Is it possible to get a list like this on a remote server from Powershell so that the data can be used elsewhere?</p>