Author Archives: Ian

Kindness of Strangers

So, I was out cycling this evening. I decided to take my bike up to Someries Castle because I’ve driven past the brown sign pointing at it on my way to work every day for the last two years and I was curious to see what, exactly, was there. The answer is not very much but I digress. The castle is on some land next to a farm and the track that approaches it is very rough. I picked up a puncture there. It was a big one and I couldn’t get enough air into the tyre with my hand pump to get myself home. Of course I stupidly didn’t have any spare tubes or a puncture repair kit on me so  I faced a five mile walk on Cycle Route 6 to get home.

Just under two miles into my walk, another cyclist passed me. He asked me if I was OK and I asked him if he had a puncture repair kit on him. He said no but that his house was just around the corner. He said that he had one there and that I was welcome to repair my bike at his home. I got to his garage and he offered me a spare tube and refused payment for it. He lent me some tyre levers and a pump and we had a brief chat with me about the area, the cycle track between Luton and Harpenden and how we use our bikes.

I thanked him profusely when I finished fixing my bike but I’d like to do so again publicly so to the very nice man who helped me when I needed it: THANK YOU.

The lessons that I’m going to take from this are as follows:

  1. Carry a puncture repair kit or spare tubes with you. Some CO2 tubes are a good idea too. Walking miles home pushing a bike is no fun.
  2. Help people who need it. I intend to carry this man’s kindness forwards; if I ever come across a fellow cyclist in distress I will help them in the same way he helped me.

I’m not going to be trite and say that this restored my faith in humanity or something cheesy like that but it was good to see that there are some decent people out there who will help you for the sake of helping you.

Me – A Progress Report

It’s been a month or thereabouts since I made the post about trying to get healthier. This is how it’s gone so far:

So, lets start with the bits where I’ve been reasonably good. In the space of a month, I have biked about 50 miles, been swimming once and swam about 600m, I have been talking walks with my colleagues at lunchtime and have walked somewhere between 15 to 20 miles during those times. Over the easter break, my girlfriend and I went on holiday to Holland (yes, actual Holland, not just the Netherlands) and we must have walked three laps around the centre of Amsterdam. I’ve done a fair amount of exercise.

On the downside, I wanted to do considerably more exercise in that time (50 miles on a bike and 600m of swimming in a month is pretty pathetic really) but a bout of illness and my time on holiday put a crimp in those plans.

I need to work harder on my diet. I have improved my breakfasts a little and my evening meals are not excessive but it’s during the working day that I need to be better. I don’t usually give myself enough time in the mornings to prepare decent lunches for myself so that inevitably means that I need to buy lunch at work. I work for a sixth form college and as much as it distresses the catering staff there, the meals that they serve are, shall we say, suboptimal. Please don’t interpret that as an attack on our catering staff, they are hard working and very skilled. The trouble is that when the catering staff prepare healthy meals for our students, they don’t buy them. I suppose it’s better to serve them chips and burgers and at least get them fed than it is to waste money on healthy food which doesn’t get sold and leave them hungry. This means that my choices when I’m buying food at work are rather limited. I’ve also learned through experience that I can’t eat in the cafeteria because when I try, I end up getting interrupted by a member of staff who thinks that their IT problems are more important than my lunch break and I end up abandoning it.  They have a food shop on campus. They sell sandwiches but they’re generally ones which I don’t like, they either have fillings which are not to my taste or they’re lathered with mayonnaise which I loathe. The shop is also loaded with confectionary and sugary drinks. There is a fruit basket at the till but there is generally only about a 50% chance that I’ll find something in there which looks edible. Pretty much the only place where I can buy filling food at college which I can eat at my desk or away from the servery is the cafe which sells panini, sausage rolls, pastries and cakes. Ultimately, it doesn’t make for a very good lunch.

My diet while I was on holiday wasn’t very good either, we ended up having chips or other junk food most days and we even stopped at a McDonald’s at a motorway service station because we were desperate and there was nothing else. I tell you, I wasn’t expecting much from it but amazingly they still ended up disappointing me. That burger was vile. It’s a mystery to me how McDonald’s are so popular.

Anyway, over the last month I’ve lost about half a kilogram. It’s progress but not as much as I wanted. I want to lose at least 15KG (32lb, 3 stone, 4lb) more and 4″ from my waistline and I am determined to do it. Again. I just hope it won’t take me 30 months to do!


Over the last few years, I have had… issues… with my weight. I have never been morbidly obese but I have been bigger and heavier than I’d like to be. A few years ago, I lost a substantial amount of weight for reasons that I eventually put down to stress; I was in a job that I disliked intensely and pretty unhappy on a personal level too. I did come out of the other side of it and had the unexpected benefit of loosing about eight inches from my waistline and about 20-25KG of weight.

Since then, I’ve gained, lost and gained weight again. I’m nowhere near as big as I was at my heaviest but I’m still on the wrong side of 100KG and some of my clothes are starting to get uncomfortable. I need to do something about this. So, I am going to start tracking what I’m eating. I’m going to cut the crap out of my diet and start riding my bike on a regular basis. I might even start making my eightish mile journey to work on my bike instead of driving it. 16 miles a day?  A tough order at the moment but if I can get my fitness up, I’ll see the benefits.

Anyway, I’m going to start posting my progress on here in the vague hope that making it public will spur me on and keep me on the straight and narrow. Wish me luck!

The Grand(ish) Experiment – The latest

Well, I’m no longer using the Venue as my daily driver. I liked the tablet and it proved itself perfectly capable of handling my workload. However, it’s now time for some the intended recipients of these things to try them out and see how they get on with them. To that end, I have given the four tablets to the occupants of one of our teaching rooms and we intend to set up a docking station in the room and connect all of their equipment to it. The four teachers have varying levels of computer confidence ranging from the high to the low so hopefully we should get a fair idea of how viable this little project will be.

We have however hit a snag. I actually tried to put the docking station in the room yesterday and connect it to a VGA projector. Unfortunately the docked tablet didn’t detect the projector when the dock was plugged into the projector using via the fixed VGA cable and the DisplayPort to VGA adaptor. They worked together happily enough when they were connected with a short 2m VGA cable so I don’t think it’s a question of compatibility as such. I think it’s down to either a faulty fixed VGA cable, the VGA DisplayPort to VGA adapter not outputting a powerful enough signal for the projector to pick up or the known problems with the A00 revision dock which I talked about before. We have a few more docks on order which will hopefully be the new revision and a Dell sanctioned DisplayPort to VGA adapter. When they arrive, we will give them a go and see if they’re any better. Hopefully we’ll be able to work around these little problems and get a setup working in a classroom for our teachers to experiment with.

On a related tangent, when we ordered our Venue 11 Pros we also ordered a couple of Venue 8 Pros as well with a view of seeing how they behaved for students. I borrowed one last week to go on a training course with. Microsoft no longer seem to be giving away paper literature with their courses, they are using electronic books instead. I hoped that they’d issue the books in PDF format which would have let me import them into OneNote and make notes on them. Sadly Microsoft use a proprietary courseware reader from a company called SkillPipe who use their own encrypted file format so I couldn’t do exactly what I wanted.

However, it did give me some time to get more closely acquainted with this tablet. Despite not being able to scribble notes onto the book, it still acted as a pretty good courseware reader with their Windows 8 app and a good ebook reader for when I was on the train. The tablet is a really nice size and weight and it feels well balanced in the hand when used in portrait mode. The performance of the tablet won’t set the world on fire but it has enough grunt to run the Office suite in its entirety, it was quite happy running the Modern Mode apps installed on it and surprisingly, it even made a decent fist of running PhotoShop CC 2014. It was quite fun using it to scribble. To my considerable surprise, after cursing and swearing at the Windows 8 interface on my work desktop for so long, I actually started to enjoy using it on the tablet. The swipes, the charms bar, the multitasking panes and the task switching interface all made sense when you poke the screen instead rather than use a keyboard and mouse. I think that if Microsoft had taken a similar route to Apple and decided to have separate OSes for desktops and tablets, the market would be looking very different right now. But I digress.

My only complaints would be the sad lack of apps on the Windows Store and the relatively low resolution screen. Google don’t have any official Microsoft apps so there is no official YouTube player, no Google Movies or Music, no Maps. Yes, there are the Microsoft equivalents but I didn’t think much of those. The availability of first party apps from other providers was pretty slim too; no Instagram, no Feedly, no third party browsers which use the Modern interface. Even where there were apps, they seems functionally poor compared to their iOS and Android cousins; I tried the Windows version of Tapatalk and it was just awful. There was, however, a decent Kindle app which I took full advantage of. Granted, a lot of these things could be accessed through the browser but I found that most websites were rendered in Desktop mode and were a bit too small to be usable with your fingers.

My other complaint was the screen. It is a 1280×800 IPS screen. The colour was good, viewing angles and brightness were excellent but after getting used to the Retina display on my iPhone and the 1080p display on the Venue 10s, the 8″ display just looked crap. A 1440×900 or 1080p screen would have been a massive improvement but I guess the GPU in the Atom Z3470D CPU isn’t powerful enough to run a display that size.

Anyway, despite all that I came away feeling pretty impressed with the Dell Venue 8 Pro and if I had a spare couple of hundred quid to spend it’d be on my list to consider.

DCM Scripts – Checking Windows Activation Status

My last script was, out of necessity, a rather laborious one. Using a VBScript to check a status, generating a file from its output, reading files, creating objects and properties etc. Luckily enough, checking Windows activations (and checking Office activations on Windows 8.1) is considerably easier.

There is a WMI class called SoftwareLicensingProduct which is where Windows just happens store the activation status for itself and on Windows 8, for Office as well.

To detect the activation status for Windows itself, use this:

$WindowsActivationStatus = Get-CimInstance SoftwareLicensingProduct -Filter "Description LIKE '%KMSCLIENT%' and Name LIKE '%Windows%'" | select ID, Description, LicenseStatus, Name, GenuineStatus

if ($WindowsActivationStatus.LicenseStatus -eq "1") {
 echo "Windows is Activated"
 else {
 echo "Windows is not activated"

And use this as a remediation script:

c:\windows\system32\cscript.exe c:\windows\system32\slmgr.vbs /skms
c:\windows\system32\cscript.exe c:\windows\system32\slmgr.vbs /ato

Strictly speaking, the first line shouldn’t be necessary if you’ve set KMS up properly but including it does at least force the machine to look at the correct server for activation.

Set up a compliance rule to look for a string which says “Windows is activated”, create a new baseline or add it to a new one and deploy to a collection.



The Grand(ish) Experiment – Two weeks in

It’s been two weeks since I started using the Dell tablet in anger. You may be wondering where the promised updates have gone. Well, here’s one.

I think that the biggest question that I needed to answer was “Can one of these tablets cope as my primary workstation?”. The answer to that is an unequivocal “Yes”. I have been using a Dell Venue 11 Pro 7139. This tablet has a dual core 1.6GHz Core i5, 4GB RAM and a 128GB SSD in there. It is more powerful than a significant portion of the desktop machines in our college and frankly, I would be shocked if it couldn’t. The only thing I’d really want from it would be some more RAM, 4GB is a bit tight these days; sometimes the tablet would freeze while I was using certain System Center components which can be a bit RAM hungry.

The dock that we received was a revision A00 dock which appears to have some issues when using it with multiple monitors. You may recall in my last blog post that I mentioned that I was having difficultly getting a DisplayPort to DVI adapter to work and that I thought I would need an Active one instead. Well, I ordered an Active one and that didn’t work either. This should be a supported configuration. After a bit of research, I found out that that Dell have put out an A01 revision of this dock which fixes these issues. It looks like Dell still have a load of stock of the A00s as the order number on the box was from the end of November and it’s a complete lottery as to which revision you’ll get when you order one. We ordered ours from BT Business so maybe you’d have more luck if you ordered from Dell directly.

This aside, the dock still worked with the DisplayPort to VGA adapter that we ordered so I have been using that to connect my second monitor. This has been OK but there has been the odd occasion where the tablet “forgets” that there is a monitor attached after the displays or the tablet wakes up  after going to sleep. Sometimes telling Windows to reactivate the display works, sometimes you need to undock and redock the tablet to force it to start working again. However, I don’t think that this will be an issue for the people who are going to end up using them as most of them won’t have two monitors attached.

The DPI difference between the tablet’s display and the external monitors has been a source of annoyance for me. Each time I undocked the tablet to use elsewhere, I ended up logging it off and back on so that the desktop was usable. When I redocked afterwards, again I logged off and on so that everything wasn’t massive. Again, I don’t know if a teacher would find this to be an issue.

As a point of interest, when the new Windows 10 build (9926) appeared, I installed it on another 7139 I had lying around and the same resolution issues were still there.

There are still a few things for me to test; I’ve not brought it home to try yet and I haven’t had the opportunity to take it to many meetings. I haven’t tried it in a classroom scenario with visualisers and interactive whiteboards either which is something I will need to do.

The next step is to give a dock and tablet to a teacher and see what they make of it!

Ian’s Cottage Pie

A good traditional British dish with a bit of a twist. I’ve experimented with Cottage Pies and Shepherd’s Pies for a while now and this one worked well in my opinion. It’s quite heavy so more of a Winter dish than a Summer one! Enjoy.

Ian's Cottage Pie
Print Recipe
Servings Prep Time
6 People 15 Minutes
Cook Time
1 Hour
Servings Prep Time
6 People 15 Minutes
Cook Time
1 Hour
Ian's Cottage Pie
Print Recipe
Servings Prep Time
6 People 15 Minutes
Cook Time
1 Hour
Servings Prep Time
6 People 15 Minutes
Cook Time
1 Hour
Servings: People
  1. Preheat the oven to 180 Degrees C/350 Degrees F/Gas mark 4
  2. Heat the oil in a large skillet, frying pan or wok on a medium-high heat.
  3. Finely chop the onion and celery. Peel and chop the carrots.
  4. When the oil is hot, add the onion and celery and fry until both are soft and translucent. This should take 5-10 minutes.
  5. Add the carrot and fry for another two minutes.
  6. Add the minced beef and fry until browned.
  7. Add the tomato puree and mix well. Cook for a further two minutes.
  8. Add the flour, mix well and cook for another two minutes.
  9. Add the stock and the Guinness. Mix well and turn up the heat. When it starts to boil, put a cover on the pan and turn down the heat to low. Leave to simmer for 25-30 minutes or until the sauce has thickened.
  1. Meanwhile, peel the potatoes and add them to a pan of salted water.
  2. Boil on a high heat for 20-25 minutes or until the potatoes are soft.
  3. Drain the potatoes in a colander and return them to the pan. Put them back onto the heat briefly to dry them out a little.
  4. Take the potatoes off the heat and add the butter. Mash using a potato masher until smooth.
Final Assembly
  1. Put the sauce into a large ovenproof dish and spread evenly across the bottom.
  2. Spread the mashed potato across the meat sauce evenly. I find that using a piping bag is generally the easiest way to do this.
  3. Run a fork across the top of the potato and sprinkle the cheese on top.
  4. Put the pie into your preheated oven and bake for around 30 minutes or until the top starts to brown
Share this Recipe
Powered byWP Ultimate Recipe

The Grand(ish) Experiment, 1st day in

Just a quick post here. The docking stations and cables for the Dell Venues arrived today and I wanted to post my first impressions.

In terms of the hardware, it is surprisingly solid. It’s very weighty and feels like a quality piece of kit. Docking the tablet is easy, it goes smoothly in and out although I think it would be better if the dock had the guiding lugs like the keyboards have but with the docking station it’s just the dock connector that holds that tablet on. You can twist the tablet on the connector a little which feels a bit scary when you first notice it.

The dock itself has three SuperSpeed USB 3 ports, an HDMI port, a DisplayPort and a USB 2.0 Fast Ethernet (100 megabit only) port. The tablet is charged by the dock when it’s plugged in.

We bought a DisplayPort to DVI and a DisplayPort to VGA adapter to go with it as well as an HDMI to DVI cable. The HDMI cable worked as expected but the DisplayPort to DVI cable didn’t. Looking further at the spec of the cable that we bought, it appears to be a passive adapter and for a passive adapter to work, the port needs to be a DisplayPort++ port and I don’t think the port on the is. I think we would need an Active adapter instead. The VGA adapter works though so I’ve been using that.

It all seems to work nicely but there is something of a quirk. The tablet has a 10.8″ 1080p screen. This means that it has a rather small dot pitch and to use the tablet’s desktop comfortably, you need to turn scaling on. When you plug the tablet into the dock with a standard DPI monitor attached to it, Windows attempts to run one level of scaling on one monitor and another on the other but this isn’t entirely successful. By the looks of it, Windows seems to run the screen at the scaling level of the main display across all screens but resizes and resamples the contents of the windows which are on the higher/lower DPI screen. This makes the contents of the windows look rather blurred. It also does strange things to the taskbar and the chrome of the windows, they are either really tiny or really large depending on which screen is nominated as your primary when you log on. I probably haven’t explained this very well, it’s quite hard to describe.

Otherwise it’s more or less like using a standard Windows 8.1 desktop. I will say it’s nice to have a third screen on which your email client and helpdesk can sit on their own while the “real” work stuff can sit on the other two.

The Grand(ish) Experiment

There has been a lot of discussion at work recently about the future and how we’re going to embrace it. Specifically, a lot of the discussion has been around tablet computers and how the college is going to start using them.

There are a lot of people who hear the word “Tablet” and think “iPad”. This is understandable; while the iPad was far from the first tablet on the market, it was the first to really grab the attention of the general public and it’s probably safe to say that it’s the best known brand of tablet out there.

We looked very hard at the iPad and we also looked very hard at various Android tablets, Windows RT tablets and even some full blown Intel Windows tablets. We bought some of each and have found some good uses for them. For example, our Security teams have cellular enabled Nexus 7 tablets with which they can log onto our MIS System and identify students and check to see if they should be in lessons or not. Our Music department have been using iPads as music sequencers. To my considerable surprise, there are even some people who like the Surface RT, a device that I absolutely loathe. For the most part, people seem to like them because they have a desktop, keyboard and mouse and that they can use them for remoting onto a terminal server relatively easily. In other words, it seems to me that they like them because they’re like thin and light laptops.

In the end, we, perhaps rather predictably, decided to attempt to standardise on the full Windows tablets. This was because, primarily, iPads and the like are single user devices; the user “owns” the device, has their email/apps/documents/settings on there and woe betide anyone else who wants to use it. That’s OK if you’re got the budget to buy 2500 devices and assign one per member of staff and student but not so good if you want to buy classroom sets and have different people use them. Yes, you can put Office on an iPad but to use it effectively and save your documents, you have to sign the Office apps into Office 365 and you have to remind people to log out of it when they’re finished. It would only be a matter of time before someone gets to data they shouldn’t be able to get at.

With a full Windows device, we can join it to the domain. Different people can log on to it and get their own settings and documents. The device can be managed by standard management systems like ConfigMgr, KACE, Altiris or whatever else tickles your fancy. They can run standard Windows software on the desktop so you don’t have to get a whole load of new applications or retrain your users that much. Windows Enterprise has a very nifty feature called DirectAccess which acts as a transparent VPN connecting the user to the corporate network wherever they are as long as they have an internet connection. In addition, a lot of the Windows devices out there are “Hybrid” devices, they frequently come with or have optional keyboard docks so they convert into a almost standard laptop for when a user wants to do a lot of “conventional” work and despite the noise about the Modern environment, Windows is a good a tablet operating system as any other and it’s been improving steadily since Windows 8 first came onto the market. There is a lot of flexibility with Windows tablets which I’ve come to appreciate since I’ve started looking at them.

Using Windows does bring its own set of disadvantages; the only way to get “Modern” (i.e. touch friendly, tablet enabled) applications is through the Windows Store. The Windows Store is somewhat behind Apple’s and Google’s in terms of number and usefulness of apps. In terms of manageability, it’s way behind Apple’s app store. At the moment, there is no way to bulk-buy apps from there. Modern apps are installed in the User’s profile, not assigned to machines so anyone who wants a Modern app needs to either have a Microsoft account attached to their domain account or we need to obtain a sideloading key and get unsigned AppX packages from software publishers to push out to machines. I haven’t looked much at the latter option as I suspect the amount of companies willing to do that can be counted on one hand.

Anyway, despite the disadvantages being presented by Windows 8.1 and the Modern interface, we decided to use Windows tablets. We looked at the lines from various manufacturers and settled on the Dell Venue range. It is vast, it ranges from the small 8″ tablets going to 720p 10″ 32  bit Atom tablets to 1080p 64 bit Atoms to dual core Core Ms to Core i3s, i5s and i7s. You can get them with large amounts of storage and RAM. They also come with a standard range of accessories such as docking stations, keyboard docks, styluses and network cards. The styluses and NICs work with the entire range, the keyboards and the docking stations work with all of the 10″ tablets. The other advantage of choosing Dell as a manufacturer is that for their corporate lines at least, they tend to standardise on parts and accessories for a number of years which is attractive if you need to support a device for the long term.

So, we’ve selected our software platform and we’ve selected our hardware platform. The question has been, what exactly are we going to do with them? There have been various ideas proposed. The 8″ Venues are really nice devices, they perform relatively well for the spec, they’re light and they’re just the right size and weight to use in portrait mode and type on them. We’re considering using those as classroom machines to replace a load of god-awful Intel Classmate convertibles we bought a few years back. However, the idea that’s really caught the imagination so far is to replace all of the teacher’s computers with them.

At the moment, our college has a desktop PC in each classroom attached to an interactive whiteboard, projector, monitor, sometimes a visualiser, a keyboard and mouse. Each department also has a staff workroom where the majority of teachers either have a dedicated PC for them to work on or a space for them to work on a laptop issued to them by the college. The idea has been to issue a 10″ Venue to each member of staff, replace the classroom and workroom PCs with docking stations for the Dell Venues and take the laptops off those who have them. The teacher could come in a the beginning of the day, dock their Venue at their desk and do some work. When it’s time for a class, they undock the tablet and go to their class. Once they’re in the class, they dock the tablet again and they’re connected to their whiteboard, projector, visualiser and any other equipment they need. There would be no need for them to log in, they’d just wake the tablet up and unlock it. They would no longer be tied to a specific classroom if they need a special piece of software installed, they’d just take it around with them. With accessories like wireless projection systems such as WiDi or Miracast, they could have the interactive whiteboard software open on their tablet and wander around the room scribbling on their tablets with a stylus and still have what they’re working on displayed on the screen. They could go back to their desk and write on the whiteboard again. Then when they’ve finished the class, they could go back to their workroom, find a free space and dock again. If there is no free space, grab a keyboard dock and sit on an empty desk or a sofa. The idea has a lot of potential and the teachers that I’ve spoken to about it so far have seen the advantages.

So with this in mind, we have ordered some Dell tablets, one 7140 based on the Core M CPU and some refurbished 7139s based on a 1.6GHz Core i5. Both tablets have a 11″ 1080p screen, 4GB RAM and a 128GB SSD. We have ordered some Dell “Slim” tablet keyboards for them. We have also ordered and received a Dell “Mobile” tablet keyboard which is the same as the “Slim” except it has an additional battery in it and also a Folio keyboard. We have ordered a pair of docking stations and a couple of styluses. We want to give the idea a go with a few people and see how well it works.

So, what’s the big experiment you ask? Well, I think that it’s unfair that I hoist all of this stuff on teachers without trying it for myself first. I intend to use one of these tablets as my primary workstation for a couple of weeks and see how I get on. I’ll put the software that I need on it and see how it copes. While my workflow is completely different to a teacher’s, it’s probably reasonably safe to say that I put at least as much stress on a computer as a teacher does, possibly more. I’ll carry it around with me everywhere I go, take notes for any meetings that I go to on it and maybe even bring it home once or twice to see how well DirectAccess works. Then when I’ve done that, I’ll offload the setup onto someone else (possibly the college Principal, he’s expressed an interest and he’s one of the Surface RT proponents). I’ll write about my experience on this blog. I’ll talk about how well it performs, the good bits, the bad bits and everything else besides. I have to admit, I’m actually quite looking forward to this.



DCM Script – Detect Office Activation Status on Windows 7 and Activate if Unactivated

This one was a lot of fun and by “fun”, I mean a complete pain.

Recently, several of my helpdesk calls have been along the lines of “When I open Word, it says that it needs activating”. As I’d hope most people with more than 20 PCs to manage do, we use a Key Management Services (KMS) Server to activate all of our Windows and Office clients. Windows and Office are supposed to activate themselves either during the build process or very soon afterwards. However, the PCs need to phone back to the KMS server every 180 days to remain activated so either the PC hasn’t activated Office during the build process or its activation ticket has expired and it hasn’t managed to get a new one. Therefore, I needed a way to detect whether Office is activated on a computer and activate it if it wasn’t. Detect a state? Remediate it if it isn’t in a desired state? Hmm, this sounds like something thats perfect for DCM! So I went a-looking, seeing what I could see.

First of all, this post is written for 64 bit machines which are running 32 bit Office. However, if you’re running 64 bit Office or 32 bit Office on 32 bit Windows, it’s just a matter of adjusting the paths for the Office VBS script accordingly.

At first, I hoped that I could use pure PowerShell to fix this. There is a very handy CIM instance called SoftwareLicensingProduct which lists the activation status for the Microsoft products installed on your computer. I thought a simple Powershell command like

Get-CimInstance SoftwareLicensingProduct -Filter "Description LIKE '%KMSCLIENT%'" | select ID, Description, LicenseStatus, Name, GenuineStatus

would give me a nice base to work from. On my Windows 8.1 machine, it does; it lists all of the KMS products on your PC and their activation statuses. However, on Windows 7, that CIM instance only lists the operating system, not Office and unfortunately Windows 7 is what is installed on the vast majority of the computers in my workplace. So that meant going back to the drawing board.

I needed another way to get the activation status for Office. From Office 2010 onwards, there is a VBS script called ospp.vbs. It needs to be run with the cscript interpreter as it’s purely command line rather than GUI driven. There are several switches for it which perform operations like attempting an activation, clearing the activation status, setting the KMS server name and port and displaying the activation status of the various Office products. Running the following command:

cscript "C:\Program Files (x86)\Microsoft Office\Office 15\ospp.vbs" /dstatus

returned the following output on my PC with Office 2013 Pro Plus, Project 2013 Standard and Visio 2013 Pro installed on it:

SKU ID: 427a28d1-d17c-4abf-b717-32c780ba6f07
LICENSE NAME: Office 15, OfficeProjectStdVL_KMS_Client edition
REMAINING GRACE: 177 days (256304 minute(s) before expiring)
Last 5 characters of installed product key: 8QHTT
Activation Type Configuration: ALL
KMS machine name from DNS: kmsserver.domain:1688
Activation Interval: 120 minutes
Renewal Interval: 10080 minutes
KMS host caching: Enabled
SKU ID: b322da9c-a2e2-4058-9e4e-f59a6970bd69
LICENSE NAME: Office 15, OfficeProPlusVL_KMS_Client edition
REMAINING GRACE: 177 days (256304 minute(s) before expiring)
Last 5 characters of installed product key: GVGXT
Activation Type Configuration: ALL
KMS machine name from DNS: kmsserver.domain:1688
Activation Interval: 120 minutes
Renewal Interval: 10080 minutes
KMS host caching: Enabled
SKU ID: e13ac10e-75d0-4aff-a0cd-764982cf541c
LICENSE NAME: Office 15, OfficeVisioProVL_KMS_Client edition
REMAINING GRACE: 177 days (256304 minute(s) before expiring)
Last 5 characters of installed product key: RM3B3
Activation Type Configuration: ALL
KMS machine name from DNS: kmsserver.domain:1688
Activation Interval: 120 minutes
Renewal Interval: 10080 minutes
KMS host caching: Enabled

Apart from the KMS Server, that output is verbatim. There is some very useful information in there; the product license, the activation information, the KMS server it’s using to activate, how long the activation has left. It’s great! Unfortunately it’s also a big lump of text which isn’t especially useful by itself.

At this point, I could have just created a package which ran

cscript "C:\Program Files (x86)\Microsoft Office\Office 15\ospp.vbs" /act

and called it a day. It certainly would have worked to an extent but I still wanted to use DCM. Using DCM would have been better because:

  • I can, in theory, set it to detect whether Office needs activating and only run the activation script if it’s not whereas using a package with that command line in it will attempt activation of Office whether it needs activating or not
  • Using a package would be a set-once kind of affair, if Office decides to deactivate itself or fails reactivation after the KMS grace period expires, using a package won’t allow the script to re-run whereas using DCM, I can re-run the detection script every hour, every day, every week, every month or whatever

So I turned back to PowerShell and, eventually, came up with this:

C:\Windows\System32\cscript.exe 'C:\Program Files (x86)\Microsoft Office\Office15\OSPP.VBS' /dstatus | Out-File $env:temp\actstat.txt

$ActivationStatus = $($Things = $(Get-Content $env:temp\actstat.txt -raw) `
                            -replace ":"," =" `
                            -split "---------------------------------------" `
                            -notmatch "---Processing--------------------------" `
                            -notmatch "---Exiting-----------------------------"
                       $Things | ForEach-Object {
                       $Props = ConvertFrom-StringData -StringData ($_ -replace '\n-\s+')
                       New-Object psobject -Property $Props  | Select-Object "SKU ID", "LICENSE NAME", "LICENSE DESCRIPTION", "LICENSE STATUS"

$Var = "Office Activated "
for ($i=0; $i -le $ActivationStatus.Count-2; $i++) {
    if ($ActivationStatus[$i]."LICENSE STATUS" -eq "---LICENSED---") {
        $Var = $Var + "OK "

    else {
        $Var = $Var + "Bad "

If ($Var -like "*Bad*") {

    echo "Office Not Activated"
    echo "Office Activated"

That script runs the Office activation VBScript and saves the output to a text file in the user’s TEMP directory. It reads the created text file and dumps the entire lot into a variable called Things (I was experimenting, I couldn’t think of a better name once I had finished and hey, it worked! If it ain’t broke don’t fix it). It converts the text file into a series of PowerShell objects using the series of dashes to separate them, replaces any colons with equals signs and excludes the “Processing” and “Exiting” lines. It uses the ConvertFrom-StringData command to add and populate properties on the objects which is why the colons needed replacing. It then selects the particular properties that I’m interested in. The whole lot gets put into a array called ActivationStatus which I can now use to do what I need to do.

The script creates another object called Var and pre-populates it with a bit of random text. It runs through all but the last object in the ActivationStatus array (If you look at the text file output, you’ll see that the series of dashes appears twice at the end so my little routine creates a blank but not null object at the end of the array) and checks to see if the “LICENSE STATUS” property is equal to ‘— LICENSED —“. If so, it appends “OK ” onto the end of Var, if not it adds “Bad “. Finally, the script looks at Var and sees if the word “Bad” appears in it. If so, it echos back to ConfigMgr that Office is activated or not activated.

The remediation script looks like this:

cscript "C:\Program Files (x86)\Microsoft Office\Office 15\ospp.vbs" /act

Simple, no?

When you’ve created the Detection and Remediation scripts inside ConfigMgr, create a Compliance Rule which looks for a string called “Office Activated”. Then, as always, either create a new baseline and deploy it to a collection or add it to an existing one.