title: Enumerate Windows user group members on remote system using c#
body: <p>Within c#, I need to be able to</p>
  
  <ul>
  <li>Connect to a remote system, specifying username/password as appropriate</li>
  <li>List the members of a localgroup on that system</li>
  <li>Fetch the results back to the executing computer</li>
  </ul>
  
  <p>So for example I would connect to \SOMESYSTEM with appropriate creds, and fetch back a list of local administrators including SOMESYSTEM\Administrator, SOMESYSTEM\Bob, DOMAIN\AlanH, "DOMAIN\Domain Administrators".</p>
  
  <p>I've tried this with system.directoryservices.accountmanagement but am running into problems with authentication. Sometimes I get:</p>
  
  <p><em>Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. (Exception from HRESULT: 0x800704C3)</em></p>
  
  <p>The above is trying because there will be situations where I simply cannot unmap existing drives or UNC connections.</p>
  
  <p>Other times my program gets UNKNOWN ERROR and the security log on the remote system reports an error 675, code 0x19 which is KDC_ERR_PREAUTH_REQUIRED.</p>
  
  <p>I need a simpler and less error prone way to do this!</p>