title: VB.Net - Local WMI Connection with user credentials
body: <p>In VB.Net, I'm trying to connect to WMI on my local computer with different credentials (the user won't have admin rights) and I get this exception :</p>
  
  <p>« User credentials cannot be used for local connections »</p>
  
  <p>Here's the code :</p>
  
  <pre><code>    Dim path As ManagementPath = Nothing
      Dim options As ConnectionOptions = Nothing
      Dim scope As ManagementScope = Nothing
  
      path = New ManagementPath("\\" &amp; vServerName &amp; "\root\CIMV2")
  
      options = New ConnectionOptions
      options.Username = vUsername
      options.Password = vPassword
  
      Scope = New ManagementScope(path, options)
  
      Scope.Connect()
  </code></pre>