VB.Net - Local WMI Connection with user credentials
问题 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 : « User credentials cannot be used for local connections » Here's the code : Dim path As ManagementPath = Nothing Dim options As ConnectionOptions = Nothing Dim scope As ManagementScope = Nothing path = New ManagementPath("\\" & vServerName & "\root\CIMV2") options = New ConnectionOptions options.Username = vUsername options.Password = vPassword