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