c# - Try to read Values in LOcal Group policy -


i trying read 2 setting values in local group policy (gpedit.msc). path :

local computer policy\windows settings\security settings\local policies\user rights assignment

the policy want read :
1. perform volume maintainace tasks (users assigned it) 2. lock pages in memory (users assigned it).

i have searched web (including stackoverflow threads) , not find solution not solution this. below code using returns me 7 values.

i not sure if possible. please suggest. using c# .net language , prefer if possible able read these setting remote machine (so preferring wmi approach).

also want read values. editing or writing...

please suggest..

  • girija

code

private void test()         {             managementscope scope =                       new managementscope(                           "\\\\localhost\\root\\rsop\\computer");             scope.connect();              objectquery query = new objectquery(                 "select * rsop_userprivilegeright");             managementobjectsearcher searcher =                 new managementobjectsearcher(scope, query);              managementobjectcollection querycollection = searcher.get();              list<string> val = new list<string>();              foreach (managementobject mgo in querycollection)             {                 var d = mgo["name"];                 val.add(convert.tostring(d));             }         } 


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -