[英]Enable\Disable Local Group policies with powershell
I have been trying to enable or disable a Local group policy with powershell to automate the process, I tried installing Remote Server Administration Tools but it's module in powershell needs the pc to be in a domain. 我一直在尝试使用powershell启用或禁用本地组策略以自动执行该过程,我尝试安装远程服务器管理工具,但是powershell中的模块需要将PC置于域中。
Is there any way to enable\\disable a Local group policy with powershell? 有什么办法可以使用Powershell启用/禁用本地组策略?
Use the registry (note that this requires elevation): 使用注册表(请注意,这需要提升):
Set-ItemProperty -Path <HKLM:RegistryPath> -Name <PropertyToChange> -Value <NewValue>
Example (Enabling Search Suggestions from Edge): 示例(从Edge启用搜索建议):
Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\MicrosoftEdge\SearchScopes" -Name "ShowSearchSuggestionsGlobal" -Value 1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.