Last active
February 10, 2021 14:21
-
-
Save owenmurr/d7180a98b08abf1b16778366852824ab to your computer and use it in GitHub Desktop.
Enabling IE mode Edge Chromium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -RunAsAdministrator | |
$source = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/814d7696-a129-49c5-9060-1345a83c4a66/MicrosoftEdgePolicyTemplates.zip" | |
$zipFile = "C:\Users\$env:USERNAME\edgeadmx.zip" | |
$unzipFile = "C:\Users\$env:USERNAME\edgeadmx" | |
Write-host "Downloading Microsoft Edge Policy Templates" -ForegroundColor Black -BackgroundColor Magenta | |
Invoke-WebRequest -Uri $source -OutFile $zipFile | |
Write-Host "Expanding Zip file" -ForegroundColor Black -BackgroundColor Magenta | |
Expand-Archive -Path $zipfile -DestinationPath $unzipFile -Force | |
Write-Host "Copying ADMX file to C:\Windows\PolicyDefinitions" -ForegroundColor Black -BackgroundColor Magenta | |
Copy-Item -Path $unzipFile\windows\admx\msedge.admx -Destination "C:\Windows\PolicyDefinitions" | |
Write-Host "Copying ADML file to C:\Windows\PolicyDefinitions\en-US" -ForegroundColor Black -BackgroundColor Magenta | |
Copy-Item -Path $unzipFile\windows\admx\en-US\msedge.adml -Destination "C:\Windows\PolicyDefinitions\en-US" | |
Write-Host "Creating new registry key - Edge" -ForegroundColor Black -BackgroundColor Magenta | |
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\ -Name Edge | |
Write-Host "Creating new DWORD value - InternetExplorerIntegrationLevel" -ForegroundColor Black -BackgroundColor Magenta | |
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Edge -Name "InternetExplorerIntegrationLevel" -Value "1" -PropertyType DWord | |
Write-Host "Creating new STRING value - InternetExplorerIntegrationSiteList" -ForegroundColor Black -BackgroundColor Magenta | |
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Edge -Name "InternetExplorerIntegrationSiteList" -Value "file:///C:\Users\$env:USERNAME\edgeIE11SiteList.xml" -PropertyType String | |
Write-host "Checking that Internet Explorer is enabled" -ForegroundColor Black -BackgroundColor Magenta | |
$IE = Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "Internet-Explorer-Optional-amd64" } | |
If ($IE.state -Match "Enabled") { | |
Write-Host "Internet Explorer already enabled" -ForegroundColor Black -BackgroundColor Magenta | |
} else { | |
Write-Host "Enabling Internet Explorer" -ForegroundColor Black -BackgroundColor Magenta | |
Enable-WindowsOptionalFeature -FeatureName Internet-Explorer-Optional-amd64 -All -Online | |
Write-Host "If this errors in anyway, please install via Settings and install from the optional features menu. Powershell and Settings dont seem to play well" -ForegroundColor Black -BackgroundColor Red | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment