Why is the WMI win32_Process commandline property is giving null for only some processes of non-admin users?

Saumya

New member
Joined
Apr 1, 2024
Posts
1
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

What I have tried:

I have 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-
1711967529713.png
But for the non-admin user I'm not getting value of commandLine as below -
1711967570725.png

So, Am I missing any property, or configuration for the non-admin user. Please guide.
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top