Windows and Office activation from a remote machine

Windows and Office activation from a remote machine

Today I was finalizing my project, finishing up the last small issue and testing deployment of software, settings and so on. It’s a small project with with a lot of freaky things to work with. It’s a Linux environment with Samba shares, no KMS but MAK licensed and so on. We had issues with LDAP syncs that would have conflicts with objects in AD and so forth.

Today I had on my list to enable Windows and Office activation. Nothing sexy or so but something that needs to work. The environment is a crisis environment so desktops are deployed and only live for the time that the crisis is there. I setup RES Automation Manager so that they have control over those desktops. The desktops are persistent desktops where users are assigned the first time the log on. They will get the same desktop for the length of the crisis.

They have enough freedom there but we manage some user settings to make sure they get the same desktop and experience during the next crisis, I think you don’t want to waste time setting proxies etc when stress is high. We set things so they can work and not break things, of course if they want they still can break things but they won’t have time to fiddle around I’m told.

So last job was the activation.

I used the PS tools and RES automation manager to get this done.

First hing I ran into was that the firewall service was disabled by a tuning script (missed that one). so let’s enable the firewall service as disabling is a bad idea. So I used psservice \\<computername>autoconfig mpssvc auto to set the service to automatic.


The desktops are listed in a text file called vdi.txt. I added the computers one by one. It’s a small environment so adding them manually was no problem.

Next step is to Start the service


Same working with the VDI.txt file and psservice \\<Computername> start mpssvc to start the firewall service.

Next up is disabling the firewall itself so that I can connect with other tools to do maintenance to the desktops. I have to install an agent later on that won’t do with the firewall active.


So psexec \\<computername> nets firewall set opmode disable to disable the firewall. It won’t disable the firewall service but will disable the firewall.

Now I can install the agent I had to install and I can do what I planned to do, active windows and office.


Activating Windows was harder than expected, Windows wouldn’t active through a proxy server even though the VDI desktop had proper Internet connection. To solve that I added the proxy server before activation the desktop.

So use psexec \\<computername> nets winhttp set proxy to set the proxy.

The next command is psexec \\<computername> script “c:\windows\system32\slmgr.vbs” /ato to active Windows.

Last be not least is the office activation.


To active office you don’t need to specify a proxy, just use psexec \\<computername> script “c:\program files (x86)\Microsoft Office\Office14\ospp.vbs” /act to active Microsoft Office.

It’s pretty basic I know but I thought I share it for others that might be looking for something like this. The script is pretty basic and the text file is just a list of computer names like




and so on…


Hope this helps you.


Leave a Reply