Powershell无法设置GPO



我想设置"中等风险文件类型的包含列表"的值,以启用并向列表添加文件扩展名。密钥存在于:

User Configuration>Administrative Templates>Windows Components>Attachment Manager

如何使用powershell打开和关闭此功能?

要在W2K8 R2计算机上基于注册表项创建GPO,路线图如下

导入Active Directory模块:

Import-module activeDirectory

创建GPO并将其链接到OU:

New-GPO -Name "MyGPO" | New-GPLink -target "ou=MyOU,dc=silogix,dc=fr" -LinkEnabled Yes"

创建注册表值:

Set-GPPrefRegistryValue -Name "MyGPO" -Context User -Action Create -Key "HKEY_LOCAL_MACHINESOFTWAREMicrosoftMyClef" -ValueName Value1 -Value Value2 -Type string

最新更新