[英]In Powershell, how to retrieve existing policy settings (Win8.1/server 2012 r2 core)
Is it possible in Powershell (using Get-WmiObject or similar) to retrieve existing policy setting on local, single win 8.1 or server 2012 R2 core machine? 在Powershell中(使用Get-WmiObject或类似工具)是否可以在本地,单Win 8.1或Server 2012 R2核心计算机上检索现有策略设置?
In SecPol the policy I want to retrieve the setting for is "Local Policies" -> "User Rights Assignment" -> "Log on as a service" 在SecPol中,我要检索其设置的策略是“本地策略”->“用户权限分配”->“作为服务登录”
I already know I can use secedit /export to dump the data into a config file, was wondering if there was a more direct way such as Get-WmiObject that would just return the object and property in question to stdout. 我已经知道我可以使用secedit / export将数据转储到配置文件中,想知道是否有更直接的方法(例如Get-WmiObject)可以将有问题的对象和属性返回到stdout。
thanks! 谢谢!
Boe Prox has written a module for this called PoshPrivilege . Boe Prox 为此编写了一个名为PoshPrivilege的模块 。
Using this module, you would use the following: 使用此模块,您将使用以下内容:
Get-Privilege -Privilege SeServiceLogonRight
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.