[英]Powershell to set GPO
I want to set the value of "Inclusion list for Moderate risk file Types" to enable and add a file extension to the list.我想设置“中等风险文件类型的包含列表”的值以启用文件扩展名并将其添加到列表中。 The key exists in:
密钥存在于:
User Configuration>Administrative Templates>Windows Components>Attachment Manager
How can I use powershell to turn this on and off?我如何使用 powershell 打开和关闭它?
To create a GPO based on a registry key on a W2K8 R2 computer, the roadmap is the following在W2K8 R2电脑上根据注册表项创建GPO,路线图如下
Import the Active-Directory module:导入活动目录模块:
Import-module activeDirectory
Create a GPO and link it to an OU:创建 GPO 并将其链接到 OU:
New-GPO -Name "MyGPO" | New-GPLink -target "ou=MyOU,dc=silogix,dc=fr" -LinkEnabled Yes"
Create the registry value:创建注册表值:
Set-GPPrefRegistryValue -Name "MyGPO" -Context User -Action Create -Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MyClef" -ValueName Value1 -Value Value2 -Type string
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.