The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Archive for the ‘Internet Explorer’ Category

OSD – Install IE 11 in the ref image like a pro using a PowerShell wrapper

Posted by Mikael Nystrom on January 27, 2015

One of the best ways to get ready for Windows 10 is to deploy Internet Explorer 11 in your current environment, if you can make IE 11 work there is a huge chance that you will have no or just a few issues when Windows 10 is about to be deployed.

The best way to do that is to add IE 11 to the reference image when you are replacing, refreshing or perform a bare-metal deployment and the next best thing is to deploy it using any software distribution engine, like WSUS, ConfigMgr, Intune or something like that.

Even if you distribute it as a software, you should still update your reference image and here it is.

Step No:1 – Download IEAK

The best way to deal with IE11 is to create a configuration only package for all Windows versions that already have IE11 installed (Like Windows 8.1 or Windows Server 2012 R2) and create a full install package for all the other versions of Windows you are using in your organization and that is done by Internet Explorer Administration Kit (IEAK), just download it from and install on a computer WITH IE11 already installed.

Step No:2 – Create all packages

Start IEAK and create all your packages for each version and each language of IE you would like to have

  • Windows 7 SP1 x86/x64
  • Windows 8.1 x86/x64

(Create both full install package as well as as configuration packages)

Step No:3 – Download the PowerShell script

After creating all the packages, with the customized settings you will have a folder structure with full packages as well as configuration only for one or more language and instead of creating one application for each of these packages you can create one application in the deployment workbench that will figure out which package that should be installed.

  1. Download the PowerShell script from
  2. UnZip it and browse to the folder “Install – Internet Explorer 11\Sorurce”
  3. Copy the content of you “build” folder that was created when using IEAK into the folder named “Source”, it should contain folder names like “BrndOnly”,”FLAT” and “Ins”

This is the tree structure after copying the files.

Step No:4 – Create the Application in the Deployment Workbench

No you need to create the application, follow these steps and you are done.

  1. Open Deployment Workbench and browse to the Application node
  2. Create a new application named “Install Internet Explorer 11” with the Command Line “PowerShell.exe -ExecutionPolicy ByPass -File Install-InternetExplorer11.ps1”

The properties of the “Install – Internet Explorer 11” application in the Deployment Workbench.

Step No:5 – Add the application to the Task Sequence

Open your task sequence and add the application to the task sequence.

Install Internet Explorer 11 is added to the Task Sequence.

Happy OSD


Posted in Internet Explorer, MDT, OS Deployment, OSD | Tagged: , , | 1 Comment »

Nice to Know–Implementing Internet Explorer Enterprise Mode with central logging to .ASP page

Posted by Mikael Nystrom on June 22, 2014

Recently I was working at a customer (you know how your are…) and the discussion on IE 11 popped up, we talked about the new Enterprise Mode (which is great). It ended up with one question…

So, how to implement this in the real world then?

I have to admit, that is a very valid question, but before we dive into the nitty-gritty stuff, what is Internet Explorer Enterprise Mode (if I’m wrong Fred at Microsoft is going to give me a hard time next we see each other). To make a very long story short, it is a way to present Internet Explorer in an old style for the web server, so instead of being “like Gecko”, it present it self as “MSIE” (like old IE version would do) and and the same time the rendering engine is working more or less the same way as Internet Explorer 8. The purpose is to be able to access old style internal websites, making business and users happy. Download for all the scripts IF you know this stuff –

If you want to read more about this and see other solutions around this:

Step 1 – Deploy Internet Explorer in the Reference Image using IEAK

Installing IE 11 can be installed manually, but please that is for consumers and non IT Pros, just don’t do that. It is also possible to deploy using Windows Update, but that is not correct way IMHO. Using IEAK is by far the best way. Download IEAK, create a package including all the settings you should have, try them out and include that as an app in the reference image.

Step 2 – Install/Configure a Website to host the global response file and the global host list

This is very easy, you just need a web server that has the “feature” of running an .ASP site. That means basically ANY webserver with .ASP install and enabled.

– Create a folder structure, in this example we will use E:\IEEM, E:\IEEM\Root and E:\IEEM\Logs

– Add support for .ASP in IIS in Windows Server 2012 R2

Support for .ASP is added to IIS.

– Create a new site that uses a port 8000 (or something else or even a hostname, as long as you can reach it..) in a folder (I’m using E:\IEEM\Root), like this.

The IEEM site is using E:\IEEM\Root as root folder and an application pool called IEEM(It will be created for you when you create the site).

The IEEM site created using port 8000.

Step 3 – Create the .ASP page to let users automatically post when Enterprise Mode is used

– Open your favorite text file creator and create the reportieem.asp file like this (You can download this from: )


<% @ LANGUAGE=javascript %>

var objFSO, objTextFile;
var DateTime, URL, EnterpriseMode, REMOTE_ADDR;
var ForReading = 1, ForWriting = 2, ForAppending = 8;

objFSO = new ActiveXObject("Scripting.FileSystemObject");
objTextFile =objFSO.OpenTextFile("E:\\IEEM\\Logs\\UserSelectedIEMode.log", ForAppending, true);

objTextFile.WriteLine("IE Mode Change," + (new Date()) + "," + Request.Form("URL") + "," + Request.Form("EnterpriseMode") + "," + Request.ServerVariables("REMOTE_ADDR"));



– Save the file in E:\IEEM\Root as reportieem.asp

– Note: If you have another folder structure, you need to modify reportieem.asp accordingly.

– Modify the permissions in the E:\IEEM\Logs for IUSR, since that is the process that will create AND update the log file. The Modify permissions should be enough.

Permissions for the Logs folder modified.

– Test it before you continue, by browsing to that page. If everything is correct you should se NOTHING in your web browser, but if you open the log file (E:\IEEM\Logs\UserSelectedIEMode.log) you should see something very similar to this:

Reading the log file to test the web servers capability to execute .ASP pages as well as testing the permissions for the webserver to write in the log folder.

Step 4 – Install the Enterprise List Manager

The Enterprise List Manager is a editing/import/export tool from Microsoft that has the ability to import lists of website that should be in Enterprise mode and save that to an XML file that Internet Explorer 11 will read and use to set each URL in the correct mode that we have defined as either Default or Enterprise Mode. You download it from here:

– Install the Enterprise List Manager using the “next-next” method.

The Enterprise List Manager installed and started.

Step 5 – Create a Group Policy to configure Enterprise Mode

– Create a Group Policy that will affect users/computers (I prefer users for this kind of policy) that you would like to configure. As a best practices you should a a small pilot group that you test on first. Enable the following policy’s:

– Enable: Turn on menu bar by default (since the Enterprise Mode selection is on the menu bar it make sense to have it enabled…)

Turn on menu bar by default – Enabled.

– Enable: Let users turn on and use Enterprise Mode from the Tools menu (They really need to see it.) and type in the URL to the webpage you created in step number 3. In my demo case it is:

Let users turn on and use Enterprise Mode from the Tools menu – Enabled.

– Enable: Use the Enterprise IE website list (this XML file will be read by IE, stored locally and used as a global list for all URL’s that needs to run in Enterprise mode). In my case that is:

– Note: This file is empty, but you will soon add content to it using the Enterprise List Manager.

Use the Enterprise IE website list – Enabled.

Step 6 – Run GPUpdate /force (or wait until it runs automatically) and verify that you can see the menu bar and the Enterprise Mode settings in Internet Explorer 11

– Test browsing to and on the tools bar you should now be able to switch into Enterprise Mode

Running in Enterprise Mode.

Step 7 – Read the E:\IEEM\Logs\UserSelectedIEMode.log using CMTrace.

Since you selected to run in Enterprise Mode, that was POST:ed to the ASP webpage and therefore recored in the UserSelectedIEMode.log file.

– Open the UserSelectedIEMode.log using CMtrace.exe (or Notepad.exe) and you will see something like this:

The UserSelectedIEMode.log opened in CMtrace.exe.

Step 8a – Examine the log file using PowerShell

Using PowerShell we can make the log file a bit better by removing duplicates and such. So, if you open an elevated PowerShell prompt or PowerShell Integrated Environment you can run this PowerShell commands to get a better output.

IIEM-LogAnalyzer.ps1 (You can download this from: )


$IEEMFileSource = "E:\IEEM\Logs\UserSelectedIEMode.log"
$IEEMData = Import-Csv -Delimiter "," -Path $IEEMFileSource -Header Event,Time,URL,Mode,Client

$IEEMDataSorted = $IEEMData | Group-Object URL,Mode | ForEach-Object {$ | Sort-Object Mode | Select-Object -last 1}
$IEEMDataSorted | Sort-Object Time | Format-Table Time,URL,Mode


Running IIEM-LogAnalyzer.ps1 to get a better understanding what is needed to be running in Enterprise Mode.

Step 8b – Convert the log file to a csv file so that we can Bulk import to the Enterprise List Manager.

Using PowerShell we can convert the log file into a CSV so we can import that into the Enterprise List manager and then Create the XML file with the central configuration for Internet Explorer to read in. Use the same PowerShell prompt or Integrated Scripting Environment and execute this:

IIEM-LogToCSVConverter.ps1 (You can download this from: )


$IEEMFileSource = "E:\IEEM\Logs\UserSelectedIEMode.log"
$IEEMUrlSource = "E:\IEEM\Logs\UserSelectedIEMode.csv"
$IEEMData = Import-Csv -Delimiter "," -Path $IEEMFileSource -Header Event,Time,URL,Mode,Client

$UrlList = foreach ($Item in $IEEMData){If ($Item.Mode = "On"){$Item.URL}}
$UrlList | Select-Object -Unique | Out-File $IEEMUrlSource


Running IIEM-LogToCSVConverter.ps1 to get a CSV for import to Enterprise List Manager.

Step 9 – Import the CSV file into the Enterprise List Manager and save to the XML file

– Start the Enterprise Mode Site List Manager and select to “Bulk add from file”. Browse to E:\IEEM\Logs\UserSelectedIEMode.csv and follow the instructions (You can read more on how to perform a bulk import here

Performing an Bulk Import.

– View, edit, modify and play around.

Editing a entry in the Enterprise Mode List Manager.

– Save the XML file as E:\IEEM\Root\ieem.xml

Step 10 – The Final Test

– Logon to a machine that is affected by the policy and have Internet Explorer 11, restart IE (just to make sure) and the net result should be this if you visit

As you can see, Enterprise is now pre-selected and cannot be changed, since the Super Cool IT Pro has discovered that many users have selected Enterprise mode to solve an issue and therefore the Super Cool IT Pro decided to help the rest of the organization and therefore he/she will be the employee of the months and wins a new Ferrari.

Step 11 – Drive the Ferrari




Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Posted in Deployment, IEAK, Internet Explorer | Tagged: , | 5 Comments »