简体   繁体   English

在Powershell中,如何检索现有策略设置(Win8.1 / Server 2012 R2 Core)

[英]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.

相关问题 如何创建用户组并通过Powershell / cmd Windows Server 2012 R2将组策略链接到他们 - How to create group of users and link group policy to them via powershell/cmd Windows Server 2012 R2 在Win2012 R2服务器上自动映射Azure驱动器 - Automatically map Azure drive on Win2012 R2 server 在 PowerShell 和 Server 2012 R2 中使用 Get-TlsCipherSuite - Using Get-TlsCipherSuite in PowerShell & Server 2012 R2 是否会为在Win Server 2008 R2上运行的Windows 7开发PowerShell脚本? - Will a PowerShell script developed for a Windows 7 run on Win Server 2008 R2? PowerShell 服务器 2012 R2 上的计划任务创建错误 - PowerShell Scheduled Task creation error on server 2012 R2 如何在Powershell脚本中将MS Web Deploy安装到Azure Windows Server 2012 R2 VM? - How do I install MS Web Deploy to an Azure Windows Server 2012 R2 VM in a powershell script? Powershell,Server 2012 R2 并确定密码套件是否处于活动状态 - Powershell, Server 2012 R2 and determine if cipher suite is active Windows Server 2008 R2使用Powershell编辑网络设置 - Windows Server 2008 R2 editing network settings with powershell 通过Powershell向证书的私钥分配权限(Win 2012 R2) - Assigning Permission to Certificate's Private Key via Powershell (Win 2012 R2) 2012 R2中的Powershell存储cmdlet - Powershell storage cmdlets in 2012 r2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM