PowerShell来设置GPO [英] Powershell to set GPO

查看:557
本文介绍了PowerShell来设置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

我如何使用PowerShell把这个和关闭?

How can I use powershell to turn this on and off ?

推荐答案

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

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

导入Active-Directory模块:

Import the Active-Directory module :

导入模块的ActiveDirectory

创建一个GPO,并将其链接到一个OU:

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

这篇关于PowerShell来设置GPO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆