Finally! Free Test Licensing for Microsoft 365 Apps
I don’t know if you noticed the BIG news in a little tweet a couple weeks ago, but we certainly did here at Login VSI.
One of our favorite WVD product managers at Microsoft posted a license key for Microsoft 365 Apps (formerly called Microsoft Office 365). It enables a 10-day subscription on machines that you might want to perform some automated testing on. (NOTE: when we tested this new key, it only gave us 5 days to start, but you have an option to run a ‘rearm’ 1 time).
This is great news for our customers because this happens to be one of the most requested help topics from them. It can be pretty costly to license non-production users for the purposes of testing and in the past there were volume keys from MSDN that could be used to enable larger scale testing that uses Microsoft Office products.
In my latest WVD testing I am using a set of users that were already registered, but we aren’t all that lucky and have a real need to test with 365 Apps because it is what a majority of production enterprise users use on a daily basis. It’s also been the biggest driver of load on a system when using Login VSI or Login Enterprise.
OK, so let’s start with that Tweet...
Click to enlarge: Pieter Wigleven Tweeted a license key for Microsoft 365 Apps
It has just about everything you need to enable a machine to do the testing you need – a license key, a way to inject that license key, and some helpful registry edits to suppress popups that get in the way of automation.
I thought I’d give it a try on a new system… so follow along and see how it works…
I’ve just setup a new instance in Azure and have chosen the “Windows 10 Enterprise multi-session, Version 2004 + Microsoft 365 Apps” image. After it deploys, it’s ready to use for the most part, except that if you try to use an Office application, you’re very limited.
First, when the application fires up, you get a lot of popups because the user has not activated yet. If I’m using automation this is already trouble.
Click to enlarge: Popups appear when the application fires up, as the user has not activated yet
…and if you tried to script the virtual user to escape these popups, you finally get to the application, in a very locked down form that you can’t do anything with.
Click to enlarge: Scripting the Virtual User only gives you a locked-down version
So, let’s use the information from the tweet to see if we can use Office with automation. First we need to load the new license after Office has been installed. This can be done using the following steps:
- Open an elevated PowerShell window, change your directory to the Office installation folder.
cd ‘C:\Program files\Microsoft Office\Office16\’
- Then you should be in the same directory as the ‘OSPP.VBS’ program. You can execute that command by using the following syntax
cscript OSPP.VBS /inpkey:DRNV7-VGMM2-B3G9T-4BF84-VMFTK
This should result in the successful installation of the 5-day key. See below
Click to enlarge: Installation success!
If you want to see how much time you have left with this license you can use the following command:
cscript OSPP.VBS /dstatus
Click to enlarge: Check how much time license-time you have left
If your 5-days runs out, then you can run this command to get another 5-days.
cscript OSPP.VBS /rearm
Click to enlarge: If your 5-days runs out, then you can run a command to get another 5-days
Now that the license is installed we still need to suppress those popups… Here are some of the registry edits suggested in the tweet:
- To Disable Activation UI, write the registry key: “DisableActivationUI”, value: “1” (DWORD) to “HKLM\Software\Microsoft\Office\16.0\Common\Licensing” path or “HKLM\Software\Wow6432Node\Microsoft\Office\16.0\Common\Licensing” if you are installing 32bit Office on 64bit Windows.
- To Accept EULA, write the registry key: “AcceptAllEulas”, value: “1” (DWORD) to “HKCU\Software\Microsoft\Office\16.0\Registration” path or “HKCU\Software\Wow6432Node\Microsoft\Office\16.0\Registration” if you are installing 32bit Office on 64bit Windows.
DISCLAIMER: You know what can happen if you modify the registry, so don’t do this on your machines unless you know what you’re doing and you have a backup. There… now I can’t be fired, but you can if you aren’t careful ?
NOTE: In my environment the Licensing folder was not in the registry for the DisableActivationUI. I added it, but it didn’t really seem to keep the popup from showing and interupting my automation. Don’t worry, our virtual user can hit the escape key now that we have a license, giving us an application we can interact with. Just add that keystroke into your Supported Application Template Workloads that you downloaded from here.
When I get a chance I’ll supply the code change in this blog via an update, until then you can always contact our support team at email@example.com and let them know you’d like help with your testing.
Click to enlarge: Contact us for help with testing
Hitting esc clears this screen (something for the virtual user to do) every time you open an Office app.
AND WE’RE READY TO TEST with Microsoft 365 Apps
Click to enlarge: We're ready to test Microsoft with 365 apps
One last note about testing with the Microsoft 365 Apps 10-day license. This time can go by pretty quickly, so develop a test strategy that allows you to re-deploy your virtual machines and continue testing when the period expires. In other words, make a clone or snapshot of an unlicensed machine that you already have setup and ready for test. When your license expires just deploy the machine again from that clone/snapshot and keep testing.
That’s all for now… stay healthy and happy… until next time…