title: WMI retrieve groups that a user is member of?
body: <p>this is my code for retrieving My local Computer Info :</p>
  
  <pre><code>        ManagementObjectSearcher Usersearcher = new ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem");
          ManagementObjectCollection Usercollection = Usersearcher.Get();
          string[] sep = { "\\" };
          string[] UserName = Usercollection.Cast&lt;ManagementBaseObject&gt;().First()["UserName"].ToString().Split(sep, StringSplitOptions.None);
  
          ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_UserAccount where Domain = 'MyDomain' and Name= '" + UserName[1] + "'");
          ManagementObjectCollection collection = searcher.Get();
          WriteOnListBox("UserName: " + (string)collection.Cast&lt;ManagementBaseObject&gt;().First()["Name"]);
          WriteOnListBox("Full Name: " + (string)collection.Cast&lt;ManagementBaseObject&gt;().First()["FullName"]);
          WriteOnListBox("Description: " + (string)collection.Cast&lt;ManagementBaseObject&gt;().First()["Description"]);
  </code></pre>
  
  <p>But I I couldnt retrieve The groups I'm in and The Email.</p>