PowerShell disables IEESC_UAC_Firewall
It is believed that the first thing most Windows administrators do when they get the deployment application of the operating system is to turn off the firewall, IE enhanced security settings, and so on.
As for why, because there are too many holes in it.
But clicks again and again are easy to miss, and troublesome, specially sorted out a disabled script for your reference
Function Disable-Firewall
{
Set-NetFirewallProfile-Enabled False-All
Write-Host "Firewall turned off"-ForegroundColor Yellow
}
Function Disable-IEESC
{
$AdminKey = "HKLM:\ SOFTWARE\ Microsoft\ Active Setup\ Installed Components {A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:\ SOFTWARE\ Microsoft\ Active Setup\ Installed Components {A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Set-ItemProperty-Path $AdminKey-Name "IsInstalled"-Value 0 | Out-Null
Set-ItemProperty-Path $UserKey-Name "IsInstalled"-Value 0 | Out-Null
Write-Host "IE enhanced Security Settings disabled"-ForegroundColor Yellow
}
Function Disable-UAC
{
Set-ItemProperty "HKLM:\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Policies\ System"-Name "ConsentPromptBehaviorAdmin"-Value 00000000 | Out-Null
Set-ItemProperty-Path registry::HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Policies\ System-Name EnableLUA-Value 0 | Out-Null
Write-Host "account access Control (UAC) disabled"-ForegroundColor Yellow
}
Disable-Firewall
Disable-IEESC
Disable-UAC
Start-Sleep-s 3