Powershell to set GPO

空扰寡人 提交于 2019-12-25 08:25:51

问题


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 ?


回答1:


To create a GPO based on a registry key on a W2K8 R2 computer, the roadmap is the following

Import the Active-Directory module :

Import-module activeDirectory

Create a GPO and link it to an 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


来源:https://stackoverflow.com/questions/10021659/powershell-to-set-gpo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!