How do I configure group policies using C#?

旧时模样 提交于 2019-11-27 19:28:01

问题


How can I manipulate group policy based restriction for the controlpanel and the taskmanager in C#?


回答1:


Have a look at WMI. Here is a link to an article on WMI Group policy objects: http://msdn.microsoft.com/en-us/library/aa375082(VS.85).aspx

This tool will generate example c# code for you:
WMICodeCreator




回答2:


you can use Registry key to restriction task manager and control panel easily!




回答3:


There is some information on how to edit GPO Registry settings available here: http://msdn.microsoft.com/en-us/library/aa374274(v=VS.85).aspx

There is also a good blog post here: http://blogs.msdn.com/b/dsadsi/archive/2009/07/23/working-with-group-policy-objects-programmatically-simple-c-example-illustrating-how-to-modify-a-registry-based-policy.aspx

The examples are in C++ but some clever person may be able to write a .net wrapper.




回答4:


This isn't a programming question, but a question of workstation policy management. Start looking at e.g. this.



来源:https://stackoverflow.com/questions/981010/how-do-i-configure-group-policies-using-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!