I have created a non-admin user, and trying to get details of Win32_Process but i'm either not getting any value or incorrect value for commandLine argument. I followed below steps to create the non-admin user and to give permissions to the non-admin user:
1.Non-admin User creation 2.Setting up the WMI configuration 3.Setting up the DCOM Access for non-admin user on the stand-alone Windows server
To Verify whether the issue is in our code or not I created a below .vbs script - ' VBScript to query Win32_Process
' Create the WMI service object
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
' Query Win32_Process
Set colProcess= objWMIService.ExecQuery("SELECT * FROM Win32_Process")
For Each objProcess In colProcess
WScript.Echo "Process Name: " & objProcess.Name & ",Command line: " & objProcess.commandline
Next
As I executed this script from Administrator user it is giving proper o/p as- enter image description here But for the non-admin user I'm not getting value of commandLine as below - enter image description here
What steps should I take to get the correct value of commandLine?