开发者

Local Security policy using WMI

I need to retrieve list of users/groups who have access to perform volume maintain tasks using WMI objects on remote machine.

What I can do it explicitly is

  1. On the Start menu, click Run. In the Open box, type secpol.msc.
  2. E开发者_如何学编程xpand Local Policies.
  3. Select the User Rights Assignment folder. The policies will be displayed in the details pane.
  4. In the pane, double-click Perform Volume Maintenance Tasks.
  5. In properties window, I can see user/group list who have access.

I need to get this exact list using WMI call in my C# application.


In order to get or modify the values of the windows security policy you must access the windows registry. Now to find the exact key which store the values which you are looking for you must check the Group Policy Settings Reference for Windows and Windows Server which contains a excel file with all the group policy settings and the location in the windows registry.


Password Policy, Account lockout policies are a part of secured registry settings. It cannot be read remotely until explicit permissions are given.


FYI that document doesn't actually work fully. Manually editing the values do not actually change the gp setting (still shows not set in gpedit), yet it does restrict the process you are setting. Also, if you manually set the value with gpedit while running procmon, the key it is hitting is not as listed in the document.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜