的的程序化操作我要寻找到在PC编程方式访问和修改本地组策略设置的方法。Windows本地安全策略
例如,如果我想查/修改值的设定
“计算机配置\ Windows设置\安全设置\本地策略\审核策略\审核登录事件”(从gpedit采取的路径),我应该能够通过命令行查询它,或者在没有gpedit或任何其他本地GUI界面的情况下为其设置值。
,我能想到的,可能解决这个问题的可行方法是以下两种的: -
编程接口为本地组策略设置操作
Based on my search
i. There were no official documentation or tools from Microsoft that could query and manipulate a given setting in Local Security Policy.
ii. The closest I could get was a vendor named sdmsoftware (Link:- https://sdmsoftware.com/group-policy-management-products/group-policy-automation-engine/) who provides a powershell interface for manipulating the Local group policy. Since the company I work is just a startup, we cant invest on any tools right now. Hence buying something is out of scope.I am looking for a freeware/OSS/any work-around to achive this.
2.包括映射到相应的注册表项或文件路径中的所有本地安全设置的映射文件。这样可以使用相同的注册表项或文件直接查询或修改安全设置。
Based on my search
i. I found a list given by Microsoft which gives a corresponding registry key to some of the Local Security Policy settings. However , the list does not contain mappings of all Local Security Settings.
(Link:- www . microsoft . com /en - us/download/details . aspx ? id=25250)
据我了解,查询任务可以通过使用Gpresult的输出结果和解析它,但是却同样无法进行修改来完成。我也尝试测试和分析下面的Microsoft工具,通过监视诸如PSmon之类的工具来查看各种本地组策略设置的路径,以便查看正在打开哪些文件以及正在查询哪些注册表等。: -
a)安全合规经理 (链接:-technet微软COM/EN-US/solutionaccelerators/cc835245 ASPX。)
b)微软安全合规性工具包 (链接:。-www微软COM/EN-US /下载/ confirmation.aspx?ID = 55319 & 6B49FDFB-8E5B-4B07-BC31-15695C5A2143 = 1)
但是,它没有产生任何结果,也可能是因为我可能没有正确分析它们。
我想知道是否有任何文档/文章/一个免费的(免费的在免费啤酒)本地安全策略的编程接口/围绕黑客的任何工作,可以让我以编程方式编辑和查询本地组设置。
在此先感谢。
为什么你不使用GP来编辑GPO? – TheIncorrigible1
@我认为GP不符合我的意思,你的意思是说gpedit.I必须定期为特定的一套配置和补救措施准备一份报告,这些配置和补救基于我的想法。我们有大约100个系统。在每个系统中使用gui并修改设置是不可能的。因此这种方法。 – m0ksh4
不,我的意思是团体政策。使用组策略服务器mmc。 – TheIncorrigible1