用于在配置自动更新Windows客户端上修改GPO设置的脚本 [英] Script for modify GPO settings on configure automatic updates windows clients

查看:210
本文介绍了用于在配置自动更新Windows客户端上修改GPO设置的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




任何人都可以帮忙写VB或powershel中的以下脚本:最近我们在我的环境中安装了新的wsus服务器现在我想将我的新wsus服务器指向我所有的100多台服务器,我不想为我的所有服务器打开GP编辑器,我只是想要
登录我的服务器并双击脚本修改下面的gpo设置:



1. 计算机配置\Administrative Templates \ Windows组件\ Windows Update \Configure Automatic Updates \ 配置
自动 更新( 启用
à 配置自动更新
à
3-自动下载并通知安装, 
à 预定安装日:0 - 每天
à
预定安装时间:18:00)



2.  计算机配置\Administrative Templates \ Windows
Components \ Windows Update \Specnet intranet Microsoft更新服务位置\
指定内部网Microsoft更新服务位置(



已启用
à 设置Intranet更新服务以检测更新:"
http://wsusprd​​01.hk:8530


"
à 设置内部净统计服务器:
http://wsusprd​​01.hk:8530


3.  计算机配置\管理模板\ Windows组件\ Windows Update \ 自动
更新检测频率\A
utomatic更新检测频率( 启用
à 间隔(小时) ):1)


4.  计算机配置\管理模板\ Windows
组件\ Windows Update \
没有自动重启,登录用户进行预定的自动更新安装\ 没有
自动重启,登录用户进行预定的自动更新安装(
已启用)


非常感谢您的帮助。

解决方案

使用PowerShell无法做到这一点只需使用管理工具即可完成。这是一个简单的编辑。


PowerShell中没有工具可以编辑GP。您只能执行链接和备份等操作。  如果您知道该GP组件的工作原理,您可以打开并手动编辑该文件。大多数都没有文档。


以下是PowerShell中的所有GP CmdLets和说明:


https://technet.microsoft。 com / zh-CN / library / Ee461027.aspx?f = 255& MSPPError = -2147217396



Hi,

Can anyone help with write the following script in VB or powershel: recently we installed new wsus server in my environment now i want to point my new wsus server to all my 100+ servers, i don't want to open GP editor for all my servers, i just want to login my server and double click the script to modify below gpo settings:

1.Computer Configuration\Administrative Templates\Windows Components\Windows Update\Configure Automatic Updates\Configure Automatic Updates (Enabled à Configure automatic Updating à 3- Auto download and notify for install,  à Scheduled install day: 0 - Every day à Scheduled install time: 18:00)

2. Computer Configuration\Administrative Templates\Windows Components\Windows Update\Specify intranet Microsoft update service location\Specify intranet Microsoft update service location (

Enabled à Set the intranet update service for detecting updates:" http://wsusprd01.hk:8530

" à Set the intranet statistics server: http://wsusprd01.hk:8530

3. Computer Configuration\Administrative Templates\Windows Components\Windows Update\Automatic Updates detection frequency\Automatic Updates detection frequency (Enabled à Interval (hours): 1)

4. Computer Configuration\Administrative Templates\Windows Components\Windows Update\No auto-restart with logged on users for scheduled automatic updates installations\No auto-restart with logged on users for scheduled automatic updates installations (Enabled)

Many thanks in advance for your help.

解决方案

You cannot do that with PowerShell just use the management tools to do it.  It is one simple edit.

There are no tools in PowerShell to edit GP.  You can only do things like linking and backups.  You can open and manually edit the file if you know how that GP component works.  Most are undocumented.

Here are all of the GP CmdLets in PowerShell and instructions:

https://technet.microsoft.com/en-us/library/Ee461027.aspx?f=255&MSPPError=-2147217396


这篇关于用于在配置自动更新Windows客户端上修改GPO设置的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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