使用 power shell 脚本启用 "不允许运行 Windows Messenger "组策略。

问题描述 投票:0回答:1

我想在Windows 2008 r2机器上执行以下任务--。

1)启用 "不允许运行Windows Messenger".2)启用 "不要自动启动Windows Messenger初始化"。

要做到这一点,组策略存在以下路径 "打开gpedit.msc >展开计算机配置 >管理模板 >Windows组件 >Windows Messenger"

需要使用PowerShell脚本来完成。怎么做呢?

powershell scripting policy messenger
1个回答
0
投票

在现实中,你可以很容易地通过regedit控制这个。

HKCU\Software\Policies\Microsoft\Windows\

HKLM\Software\Policies\Microsoft\Windows\

这将工作,AFAIK。

Set-GPRegistryValue -Name "WindowsMessenger" -Key "PathToYourTheKeyYoudNeed" -ValueName "xxx" -Type String -Value "YourValue"

这也适用于

-type DWORD

现在,我很遗憾地不能真正检查,必要的键在哪里,你需要控制,因为我没有任何2008r2在我的公司环境。

希望我可以帮助你

© www.soinside.com 2019 - 2024. All rights reserved.