Preinstall Company Portal App to your computers with MDT

In a current project which has the goal to migrate from Windows 7 to Windows 10 we have no ConfigMgr infrastructure available and cannot use Autopilot or PPKG file, because we must install Windows 10 on the devices first. Therefore, we decided to use MDT and after the setup we use the Advanced Autopilot to force the user to enroll his device to Intune. But after the enrollment it takes a lot of time until the company Portal is also installed. Without the Company Portal the user cannot install additional apps and is blocked from working.

The main Problem is, that after a new user is logging on to Windows, all the Modern Apps must be updated. This can be because the user changes the OS language, or the apps are updated in the store. But also, the Microsoft Store is a Modern App and is updating itself after the login of a new user. During this process it takes a long time, up to 30 minutes, until you get the Company Portal App installed. And sometimes the Store App is hanging or crashing at all. So really buggy and not end user friendly.

With that in mind I will now preinstall the Company Portal App for all users during the Staging Task Sequence. To get the offline appx file of the Company Portal app, you have to go to the Microsoft Store for Business and download the offline installer.

Or if you don’t have enrolled for the Microsoft/Windows Store for Business, check out this Blog or the Video from Mirko.

If you don’t have the option for offline download, check the following setting.

If the offline version is available, you can click on “Get the App”.
Now the App is added to your Inventory. Therefore, the button “Get the App” has changed to “Manage”.
On the download page, you can download all the files, which are available and put them together in one folder.

Move the Dependencies to a subfolder called “Dependencies”

Next you can download the Install_CompanyPortal PowerShell Script from GitHub.
You have just to customize two lines in the PowerShell Script with the filenames you downloaded from the Microsoft Store.
After that you should have a folder which is looking like in this screenshot.

Integrate it with MDT

The easiest way is to install the appx in the OS deployment task sequence, if you still use MDT:

Just create a new Application with Source files.
Specify the Application Metadata.
Select the folder, where you have downloaded all the files.
Next …
Here you can specify the command line:

powershell.exe -executionpolicy bypass -file Install_CompanyPortal.ps1

Next … Finish
Now we modify the task sequence to install the app to all devices.
Save the Task Sequence.

Now you made the life for your end users much easier and they will enjoy a much faster enrollment of Windows 10.

*Special* for WimAsAService Customers

With WimAsAService you can easily build your Custom WIM Files.

The easiest way to include the Company Portal App in the WIM is to ZIP your folder with all the files and upload it like other applications.

As command you can use the same like in MDT:

powershell.exe -executionpolicy bypass -file Install_CompanyPortal.ps1

According to the automatically generated documentation it is now installed in the image.

I hope the blog is helpful.

Thomas Kurth
Follow me

Thomas Kurth

Principal Workplace Consultant at baseVISION AG
I’m a consultant, trainer and architect for workplace management and enterprise mobility projects with Microsoft Technologies in the past eight years. I love to push and design the modern workplace based on Windows 10, EM&S and O365 for my customers which is the only answer for the current security threats, agile world and the fast-changing business requirements of my customers. Important for me is to simplify and automate the operational processes, because there are the highest costs.

MCSEMCTCMCE
Thomas Kurth
Follow me