首页 > 系统服务 > 详细

使用PowerShell修改Server20102R2系统配置

时间:2015-06-11 00:21:36      阅读:389      评论:0      收藏:0      [点我收藏+]

#更改IP地址

$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = ‘true‘"

$wmi.EnableStatic("192.168.88.12", "255.255.255.0")

$wmi.SetGateways("192.168.88.88")

$wmi.SetDNSServerSearchOrder("192.168.88.11")

#更改计算机名并加域

Add-Computer -NewName s12 -DomainName fymint.com -Credential fymint\administrator


#关闭防火墙

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled false

#关闭UAC

Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 00000000

关闭IE ESC

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" -Name "IsInstalled" -Value 0

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" -Name "IsInstalled" -Value 0

#仅检查更新

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" -Name "AUOptions" -Value 2

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" -Name "CachedAUOptions" -Value 2


本文出自 “fymint” 博客,请务必保留此出处http://fymint.blog.51cto.com/10204722/1660570

使用PowerShell修改Server20102R2系统配置

原文:http://fymint.blog.51cto.com/10204722/1660570

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!