使用PowerShell修改Server20102R2系统配置

#更改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

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。