Thursday, November 29, 2012

SITS StuTalk

SITS is a student record system. It contains details about students, such as the course they are on, grades, etc. We were using version 8.5.0 at the time of writing.

StuTalk is a web service interface to SITS. You can do a handful of things with this – the two main ones, for me, being to import and export data via XML Exchange Templates (XET).

The XET screen in SITS lets you create and edit XET templates that map the SITS data model to and from an XML file. You can use File > Import and File > Export from the main menu in SITS Vision (the desktop client) to manually import and export SITS data in XML format through the XET templates.

These even work for things like TUPs (SITS triggers) so I can export those from development, put them in source control and then import them in to live during a release.

It can also handle nested data and the XET screen knows about many of the relationships between entities so you can just add the entities and let it sort out the details most of the time.

A big plus about XETs is that they will trigger the SITS customisations (that is, your business logic) that you might have configured, such as TUPs. This obviously isn’t the case if you attempted to import the data directly into the underlying SITS database tables.

On the other hand this is slow. Attempting to export ~9k rows of data with a handful of entities took hours. After discussion with the vendor we learned that direct table access is still the recommended approach for pulling large amounts of data out in one go.

However, a more event-driven approach is possible which removes the need for a big bulk export. We use TUPs to raise events (such as a student enrolling to a course) and place these events onto a “service bus” (MSMQ message queues). Some custom code then processes these events, in some cases making a XET export request via StuTalk to fetch additional data out and then pass the resulting dataset on to another system, such as our VLE (Moodle) or maybe to more custom code to have an email account created or whatever.

A second “gotcha” is that XETs cannot import child entities if the parent is using auto-generated primary key parts. The example that bit us was with IPRs and IPRQs. We use these to import things like prospectus requests made over the phone or through our website. The TRAN process in SITS lets us match this new enquiry up with others so we don’t double-count our enquirers (they may have contacted us before). The IPR represents the enquiry and IPRQs are a way of defining additional custom data.

The XET template is defined such that it auto-generates a sequence number for the IPR. The child IPRQs need this sequence number as a foreign key so they are related to their parent IPR, but the XET import does not do this for us. The SITS consultants and helpdesk people first tried to tell us that this “just worked”, but this turned out to be because their training systems had IPR and IPRQ sequence numbers that happened to be in sync, so generated matching numbers by accident. Doesn’t work for us as our sequences are not in sync as we have real data not a static training set. We were then told we could achieve it by using some “registers” which are special data slots we can use during the import, but when we tried it we couldn’t get it to work. The SITS Helpdesk people then admitted the product couldn’t do this and closed the call.

To work around this deficiency of SITS we have a two-stage import. The first stage imports the IPR (and we include a key value from the source data in a user defined field of the IPR). A TUP fires and writes an event out to a table. This event includes the auto-generated sequence number that was given to the IPR by SITS during the import as well as the other key parts and the source key we imported (see above). Using the source key we can get back to the source data and pick up our additional data to import into IPRQs via StuTalk, using the auto-generated sequence number from the IPR to relate the IPRQs correctly.

Friday, November 23, 2012

Pulling a RAID drive

My development environment is a bunch of virtual machines (VMs) running in Hyper-V on a Windows 2008 R2 Server. The server is a Dell Precision T7600 (details in previous posts). It has a separate RAID controller card with a battery that’s started showing warnings about not charging due to high temperature.

The RAID has 4 SAS drives configured in RAID 10, so a single drive failure should be covered because each physical drive is mirrored on to another physical drive. So this consumes half your total drive space, but means you can survive a drive failure (in theory).

However, does it work? What would it even look like? Long story short: I just yanked a drive out while the host was still running.

Everything was smooth. The Hyper-V host didn’t event wobble. The MegaRAID software gave me an alert, so I launched the Storage Manager where it gave me a bunch a details. I pushed the drive back in and it began rebuilding the drive – presumably it’s copying the data from the mirror back over. It reckons this will take about 2 hours, but the system is still usable while it does this. Update: It actually took 9 hours to rebuild the array.

Here’s a screenshot of the Storage Manager during the rebuild (click to enlarge):

RAID rebuild following drive hot drive removal

Friday, November 16, 2012

Activating Windows 7 Enterprise

I added the Windows 7 Enterprise disk, from MSDN, to my Windows Deployment Server (WDS), so I could install a test client PC.

The first thing I learned is that a WDS (PXE boot) Approval or Rejection is for the device (not the attempt) and is remembered by the WDS server. So, having rejected the first attempt for laughs, it then would not allow the client PC to connect again via PXE. It won’t let me delete the rejection from the list via the UI and gives an error if I try to Approve a Rejected request.

A bit of Googling indicates that these will tidy themselves up automatically: rejections after 1 day and approvals after 30, but I want the rejection gone now. I used the command line to do this, however, right-clicking on Pending devices in the WDS UI shows built-in Delete Approvals and Delete Rejections actions (in Windows Server 2012 WDS at least).

I then installed Windows 7 but activation kept failing with “DNS Name does not exist”. More Googling reveals it’s probably trying to connect to a Key Management Server (KMS) as it’s the Enterprise edition. Control Panel > System > Windows Activation > Change Product Key lets me enter my MSDN key and activates successfully. Then there are ~100 Windows Updates to install.

Thursday, November 15, 2012

Auto-register AD DNS host name from CentOS

You can get a Linux (CentOS 6.3) server installation to automatically appear in a Windows DNS and Active Directory configuration (vanilla Windows Server 2008 R2).

At the Windows end, you first need to tick “Dynamically update DNS A and PTR records for DHCP client that do not request updates (for example, clients running Windows NT 4.0)”. I did this via Start > Admin Tools > DHCP > [server] > IPv4 > Scope > Properties > DNS.

You can check what the Windows DHCP server is up to by examining the logs which are in c:\windows\system32\dhcp. This was happening by default on my test rig. It starts a new log each day and keeps a week of history and also writes the status codes at the top of each file. I’m looking for DNS Update Request (30) and DNS Update Successful (32). You should be able to see these for Windows 7 clients (for example) and can generate them by doing an ipconfig /release and ipconfig /renew.

We then installed CentOS 6.3 via the minimal network installer image, which then drags down the bits it needs from the internet. We first set the VM guest to use the legacy network adapter for this, as the image doesn’t have Hyper-V Integration Services installed so can’t use the default one. We also set the memory to 1GB. At 512MB the installer didn’t give us the graphical install user interface.

During the initial phase we told it to use IPv4 with DHCP and disabled IPv6. It then needed a URL for the phase 2 image and a bit later it started a graphical setup user interface. We gave it the FQDN for this new host ( for example). At the bottom of this screen is a Configure Network button. We pressed this and edited eth0. IPv4 was set to Automatic DHCP and we set the DHCP Client ID to match the hostname given above without the domain (so just “newhost”).

Do the rest of the install and then reboot.

Next, enable DNS through the firewall.

Then you need to add an entry to a config file:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

There should be some stuff in here already. You need to add:

“newhost” again needs to match with what you did before. Then “<Esc>:wq” to write and quit vi.

Then ifdown eth0 followed by ifup eth0. This should release and renew via DHCP so checking the Windows DHCP Server log should show the expected DNS update messages.

Back on the Windows Server, the hostname (newhost) should appear in the Name column in DHCP Address Leases and an A record should also appear in the DNS forward lookup zone.

Wednesday, November 7, 2012


I’ve had the Surface for a week – here are some thoughts about it.


The Surface is basically Microsoft iPad. Apple got there first and showed that there’s a huge market. Microsoft is a big ship and takes time to turn, due, in part, to carrying an enormous amount of legacy stuff, but appears to be sailing in the right direction again at last.

The Surface is a small, touch-screen PC, with good battery life, intended for basic stuff (web surfing, social networking, etc), but with more convenience than laptops or notebooks ever managed to provide. You can actually plonk one of these into your lap and do stuff, without the added “bonus” of ironing your underpants at the same time.

It runs Windows RT, a minimal version of Windows 8, fronted by the new Modern UI (the user interface formerly known as Metro) and its new apps model.

The main restriction is that the old-style Windows desktop isn’t really present. The basic tools & utilities are there and so is Office, but you can’t just install your old Windows applications – you need full Windows 8 on a desktop or laptop for this.

The new Modern UI is brilliant, in my opinion. The tiles are the right size to be easy to use with the touchscreen and they easily flow their layout to suit their environment, so you can use it in either portrait or landscape orientations, or snapped in (see below) or on Windows Phones. The tiles can update to show you status info (unlike old, dead desktop icons). The design also carries through inside the new apps and internal data items (such as a person or a sports team) can be pinned to the start screen, exposing the content that is important to you right at the surface of the *ahem* Surface. Common operations, such as searching and sharing, are also integrated so you no longer have to learn a new apps’ quirks to do basics (well, not so much anyway, hopefully).

This design is also already all over much of Microsoft’s websites so should quickly become ubiquitous and familiar. It’s also worth pointing out that Microsoft has quite a stable of products and services. They are all getting an overhaul and being integrated via Windows 8. Here are some obvious examples:


MySpace Social networking, like Facebook, Twitter
Xbox Music (was Zune) Pay-per-track (iTunes) or subscribe (Spotify)
Xbox Also does PC games (like Steam)
Skype Web-cam, like FaceTime
SkyDrive Online file storage (DropBox)
Azure Application development and hosting platform
Office 365 Office and business tools and collaboration, including SharePoint

Integrating that lot is going to be an on-going effort, I suspect, because that integration of services is going to be key. We increasingly have the potential to “do stuff” wherever we happen to be, but we want to be “doing the stuff” more while managing the toolset less (ideally not at all).

The Launch

The Surface & Windows 8 were both launched on Friday 26th October 2012. I pre-ordered my Surface a few days before the launch and was under the impression that it would probably arrive early so it would be with me for the launch. The Surface was not available in shops at that time and could only be acquired via pre-order from the Microsoft Store. I then received an email telling me that it would arrive sometime between the 26th and Tuesday 30th and giving me a £50 voucher at the Microsoft Store to apologise (not a refund of some of the actual, real money I gave them though, just a voucher and a bunch of restrictions including an expiry date). It actually arrived at 20:30 on Tuesday 30th. I’m not really into “launch dates” and stuff like that. It’s just marketing bullshit anyway. But, if you’re going to play those games, maybe getting the pre-paid punters their goodies for the launch would be a good idea, no?

Once up and running and connected via Wi-Fi it found updates for 15 of the built in apps. I confirmed the updates then swapped away to another screen. It wasn’t clear whether they were going in the background or not and when I swapped back it was stuck downloading part way through the first app, but it sorted itself out in the end. UX could be better.

The Touch Cover and keyboard

The Touch Cover keyboard is surprisingly good. The keys have no action so I can't really touch-type on it properly, but is still very usable. It’s the best compromise between portability and usability I’ve seen. It also has a USB port – I briefly used my external USB keyboard, which seemed to be working as expected.

It also snaps on magnetically (which was charmingly cool when I first attached it, although now totally ruined by the TV ad campaign), as does the power connector, although disappointing that it's another non-standard power connector – I’m not sure if the built in USB port can also charge the surface?

Visually the cover is underwhelming: it only covers the screen and the reverse side is made of the same material as the lining inside of my car's boot. I was expecting something in leather, which offered some protection for both sides of the Surface. On the other hand, the cover is so thin it flips over to the reverse side where it is out of the way for handheld use.

As an aside, the touchscreen interface also does handwriting recognition. Just draw words with your finger. Works well for what it is, but is of limited use to me given the touchscreen keypad and Touch Cover keyboard are both better.

The older Windows voice recognition stuff is also present via the desktop, but I’ve not used this on earlier editions nor on Surface so have no idea if it works or not. The iPad’s “dictation” feature was semi-laughable in that it would have a go, but get most things wrong.

Integrated Social Networking

Windows 8 integrates social networking through a plug-in architecture, so you can tell it about your Facebook & Twitter accounts, for example, and it will download your friend’s contact information, tweets, pictures, etc and present them all together in the built-in People app. No more flicking between various walled gardens (although I expect some dirty tricks when vendors of said walled gardens realise their audience is no longer having to come and see their adverts to get at content).

RSS feed integration is conspicuously absent which is almost unforgivable to me. Ideally I would be able to pull from my Google Reader account but I’d even consider swapping to a Microsoft equivalent if it would push the RSS posts into the What’s New feed, but it doesn’t seems to be capable.

You can also post updates from Windows 8, but this is disappointingly limited at the moment. You can only choose one target at a time, so still have to multi-post, and pictures are not handled well. You can post them, but first I had to Share them to SkyDrive, then I can Share that uploaded picture, but the URL takes most of the 140 character tweet, making the feature stupidly long-winded, and ultimately pointless.

The Skype app is also ready for download via the Store. This uses the built-in webcam, mic & speakers so video-chat is doable without any additional hardware. I’ve only tried this over a LAN so far though so no idea how good it is “for real”. 

It also integrates my Xbox Live friends, but I can’t find a way to view or write messages. Seems like a weird omission and an obvious candidate for the plug-in architecture to me. The built in SmartGlass app lets me remote control my Xbox while at home, so I can play & pause DVDs etc, but it doesn’t actually send audio or video to the surface – it’s basically just a remote control.

Office 2013

Office is, traditionally, the killer app that underpins Microsoft’s success, and I think it’s a clever move for them to have bundled a version of it with Surface. It’s a “preview edition” of 2013, which will upgrade to the real version when it is released, however it’s the Home & Student edition, so probably has feature restrictions. So far it’s done all the basic stuff I require though. The Touch Cover is almost mandatory here as the Office apps are just updated desktop apps, not Modern UI apps, and so aren’t optimised for the touch-screen. It’s still usable, just harder to hit all the little desktop buttons with my finger.

The Desktop

The old-style Windows Desktop is available, even in Windows RT, but it won’t allow you to just install any old Windows apps. The Surface is intended for the new Modern UI apps, not to support old legacy stuff – you’ll need full Windows 8 for that.

The desktop that is included is used by Office and also includes most of the traditional Windows built-in tools & utilities. Notepad and PowerShell are there and so is Remote Desktop Connection, which worked as expected when I connected to a Windows 7 laptop via Wi-Fi at home.

Old-school windows updates are also included. There were four ready for download on first use.


The Surface has Wi-Fi and Bluetooth, but no built-in mobile network access. Presumably you could turn your mobile into a Wi-Fi hotspot and use that for data on the go or tether it to a mobile, possibly via the Bluetooth connection, but I’ve never had any joy with this stuff – it always seems to require stupid-expensive contracts, or in my case, for Microsoft to not allow the phone operator (Orange) to veto the feature despite it being supported by the phone. Bastards. I’ve got Wi-Fi at home and work so am covered as much as I need to be.


The display is very nice. While it might not be as good, technically, as the super-hyped Apple “Retina” marketing gimmick, it’s still a lovely thing to look at. I’m not sure having more pixels would actually improve it, in the same way that high-definition telly doesn’t actually make films any better – a shit plot isn’t going to be rescued by high-res graphics.

The two built-in cameras’ quality isn’t very good, although I can forgive it a little as the Surface’s form-factor isn’t really great for photos anyway. Your phone is almost certainly more convenient to hold up and snap with and if you’re serious you’ll have a proper camera. I guess it’s really meant for web-cam stuff. On the other hand, it weakens the deal for fans of the current trend for sharing endless baby photos via Facebook.

The built-in speakers are OK – better than the usual junk I get on laptops. Not good enough to actually enjoy music though – I’d use headphones or an external amp for that, but fine for Skyping or showing video clips to a friend, for example.

It also has built-in Flash support, so video clips just work. I know this was a minor sore point with the iPad. I respect Apple’s decision to stick to principles and advance the speed of HTML 5 adoption, but I also respect Microsoft’s decision to bundle tools for which it feels there is a market.

Basic Touchscreen Stuff

This stuff is covered elsewhere in detail, but I thought I’d provide a summary of the basics. Much of this is common across the Surface (and similar on Windows 8 with a mouse).

The start button, in the middle, under the screen, will get you back to the start page.

Swiping your finger in from off the left of the screen and releasing will flick between the open apps.

Swipe in from left and hold your finger on the screen, then drag back to left, to see list of open apps to choose from.

Swipe in from left, hold as above, but drag to the left or right quarter of the screen to snap the app into a partial split-screen mode. The smaller app will lay itself out so you can still use it even though it’s got limited space. You can snap the People > What’s New app in and keep tabs on updates while still doing other stuff in the main part of the screen, for example.

Swipe in from the top or bottom to get management and app-specific tools. In Internet Explorer, for example, this will give you a list of open tabs at top of screen. It will also show sites you visit frequently. Within IE you can swipe from inside the left edge of the screen to go back, but be careful not to swipe in from outside the left edge as this will switch to a different app (see above).

Swipe in from the right for the Charms menu, which includes settings and integrated search. You can search across multiple sources in one place so this is a good one to remember.

Protip: WinKey+X works with the Touch Cover keyboard, which gives you an instant “cheat sheet” menu of all the common Windows administrative tools.

You can take screenshots by pressing the start button (the Windows logo under the screen) and the volume down button at the same time. The screen will dim for a moment to show it took and the photo will be in Pictures app > Pictures Library > Screenshots. I intended to do some for this blog post, but it’s already become a monster.


Typing a complex password, with case changes and symbols, is a pain on the touchscreen. You can, however, set a PIN number as well and/or define custom gestures over a photo for a better touchscreen sign-in experience.

Xbox Music

Microsoft had their own music player (iPod equivalent) called Zune. I’ve never actually seen a device, but the Windows client could be installed, like iTunes, to manage, buy and play music on PC. You can buy tracks or take out a subscription (a “music pass”). The pass works across a limited number of devices, so you can’t share an account between friends, but can use it on Xbox, Windows, Windows Phone and Surface, for example.

The first time I used this via the Music app on Surface I was listening to music then inserted my headphones, also for the first time. The music stopped. Error message. Will not play again. Keyboard clicks were coming through the headphones OK. I restart (it’s not my first Microsoft experience). It spends 5 minutes "configuring windows features". The headphones work OK after that. Poor. Very poor.

The Music app is good, better than the older Zune app, on which it’s based. It’s quite pretty. It will import playlists (I’ve not tried), and will sync them across devices from now on (also not tried). A shame there isn’t an update to Zune to migrate existing users’ playlists.

The music playback slowed down when I left the Surface unused for a few minutes. I’m not sure if this is going to be common when entering low-power modes or whether it happened to be doing something else in the background, but it doesn’t bode well for using this as a portable music device.

I’m not convinced the store integration is fully-baked either. I added the 28 Days Later theme tune to my music. The track is called “In The House-In A Heartbeat” and I found it on an album called The Definitive Horror Collection by London Works Music and added it to my music collection. At the time I noticed some other tracks on the album that looked interesting, but then, whenever I searched for the album, it would only show me the one track from my collection - I can't figure out how to view the other tracks on the album. This has since “fixed itself” somehow. Not sure if bugged or whether the UX was tricking me into looking at the wrong thing.

The music app interface also suffers, as the Zune one did, in that it's quite hard to actually browse music without accidentally playing a track, interrupting your current play queue. It's also hard to move around and browse. If it shows me an album and I click it I expect to drill-down to the album details, but quite often this either isn't possible or it does something else, like starts to play the album.

Windows Phone

My Samsung Omnia 7, running Windows Phone 7.5 “Mango”, will plug in via USB and charge, but under PC Settings > Devices it's listed as USB Composite Device and is shown as "Not compatible with this version of Windows", so I guess I won't be using it to sync my music from Windows 8 to my phone, which is a shame as this was supported under Windows 7 via the Zune client software and let me take music from my music subscription on the move with me via the phone.


The email app is fine. Basic, but does the job. Presumably Outlook will come along eventually (for a price) and provide all the advanced stuff your average business user might be used to.

Junk-email handling is missing, which is a shame, but automatic conversation ordering is there, which I like.

At work, I cannot use personal email accounts directly, via POP3, SMTP or IMAP as they are blocked by our firewall, in case a rogue machine spams and causes our IP to be blacklisted. So I can't get at personal email in the mail app while at work. However, hotmail / can ingest email from other accounts via POP3 and can then deliver them to the Surface email app, presumably via a web service over HTTPS, so it gets around the blocked ports.

Emails sent from this account go via an auto-generated account name on behalf of my personal email (so replies to that email go to my personal address and not back to MS)! Cool.

Except it doesn’t seem to work reliably. I tried to alter the settings at hotmail so it would deliver the email into my inbox instead of a sub-folder, but the setting change won’t take – hotmail is “unavailable right now, very sorry, please check connection, etc”. I suspect it might also only pull unread email and as my Surface and Windows Phone both can get at the account via IMAP, at least some of the time, they might be confusing things. Or could just be broken – I’m not sure I care enough to find out.

Apps (from the Store)

I’ve heard some drubbing going on about apps. Apparently Surface has only a few whereas iPad has 250k+. Ok, but I bet you couldn’t get me to install more than a handful. From what I’ve seen so far most of these apps, on both platforms, are rubbish. Rubbish games or rubbish attempts to sell you content that the vendor stole from the internet anyway. Or rubbish utilities. Or sad marketing “apps” that are just glorified adverts for some crap they want you to buy.

The Skype app, granted, is an exception. But then it fronts an actual, real, service that’s useful. See also: the Kindle app.

The vast majority of the rest you can keep.

It’s Not Perfect

It’s not all good though.

Setting up a second user from scratch, for my wife, was a bit pants. It will let you have multiple accounts, but it wasn’t clear if entering Facebook details had worked or not. It eventually downloaded contacts, following a reboot. More feedback on the status of asynchronous tasks needs to be made a priority.

I also mistyped the outgoing server name when setting up personal email in the email app. It got emails down but couldn’t send new ones. I fixed the server name, but it was still giving an 'unavailable' error message when I asked it to sync email. Another reboot fixed it.

Mouseovers don't work well in IE, so getting at scrollbars in Google Reader is impossible with the touchscreen, for example. You could use the mouse in the touch cover of course, assuming a desk is handy to put it on.

Touching a tile or item usually invokes it - files in SkyDrive will open, for example. To do other things, such as delete a file, you could right-click with the mouse. With the screen, touch and hold. After a second it should dip down a little and show a tick box. If you now drag down a little and release you get a blue bar at the bottom and the item you selected will have a blue border. Repeat on other items to multi select. Repeat on same item to unselect. Then Manage > Delete to delete the selected items. This isn’t really well thought-through. I had to Google to find it and the ticking mechanism is half-baked.

Going back in to apps from the start screen switches back to where they were if they were already open, instead of going in at the “top” again. This is sometimes useful and sometimes a nuisance as I’m stuck with having to figure out how to navigate back “up” to the top of the app.

The People app > What's New tends to refresh itself every few minutes, which makes it jump back to the top of the list, which is very annoying as I then have to flick through again to get back to where I was at. It also freezes occasionally and sometimes some of the tiles are empty. If you swipe in from the bottom while What’s New is “synchronising” it restarts the app.

At one point the SkyDrive app just showed a blank white screen. Nothing doing. Reboot = fixed.

Sharing a map location was also bugged. Its another great feature and demonstration of how cool the integration would be in that I stuck a pin into the map and hit Charms > Share > Email and should have just entered a recipient’s email (which searches contacts and autocompletes, so is super easy), except the touch keypresses weren’t going in. Hiding the on-screen keyboard made the keypresses appear in a weird, slow, one-key-at-a-time motion replay style, but wouldn’t then let me actually send the email. I tried again later and it worked fine. The email gets a little map thumbnail image embedded and the recipient can click through into the map to get it to open in the browser to interact.

There is no built-in to-do app (and is also missing from Now, I partially agree that to-do lists are a bit lame – I rarely actually do the things on them, but at least it gets them out of my head so I can safely forget about them. I prefer to actually schedule the item in the calendar but then I’m stuck with pushing them all ahead of me when I don’t actually do them when I said I would. Ideally I’d like a list of initially unscheduled items (a traditional to-do list) which can then be scheduled, but also stay on the list until I say they were done.

It occurs to me that this list would be super-interesting to companies in a wish-list kind of way. I’m basically declaring things I might want to do or acquire or need to acquire related things in order to do, which is a golden sales & marketing opportunity if there ever was one. Hell, it’s also a social networking thing. Maybe “learn piano” is a thing to do or “see a band live” or “get fit”. You can probably sell me stuff related to these desires, or put me in touch with like-minded individuals.

Google StreetView doesn’t work either. It links to some help explaining how to make it work on Windows 8, but I couldn’t get it to work on Surface.

Offline Use

I’m undecided about how the Surface handles offline use. There’s too much “I’m sorry. I can’t do that right now because you are not connected to the internet” going on. OK – so cache it and forward it later. While network connectivity keeps getting better, it’s still a long way from 100% in the UK.

The obvious basics are covered though – you can listen to your stored music while disconnected and can work on Office documents which can sync to SkyDrive later on, although even this is flaky. An Excel worksheet opened from SkyDrive, for example, would not open as the Wi-Fi connection was poor. Just open the cached copy you stupid thing.



Usability – the size, weight, battery life, keyboard, touchscreen and Modern UI all meld together to provide a very nice, handy, usable device. As Jeff Atwood has said (several times) this is the end for laptops. The Surface does the basic stuff that you need most of the time. For anything specialist (your day job) then you’ll need something chained to a desk anyway. Laptops were never really portable enough to be useful to me, and phones, while portable, aren’t usable enough. This hits the sweet spot in the same way I’m sure an iPad would.

Built-in Skype support.


No built-in RSS feed support. This is a shame as RSS is pretty much the best thing ever. Seriously.

Half-baked built-in social network support. This stuff absolutely has to sing and sizzle and zip and ping, aaaaaaaand it just … doesn’t. Everybody is Facebooking the shit out of each other and for the Surface to take with 90% of the population it has to nail this stuff. I honestly couldn’t recommend the Surface to most of my friends and relatives as they would just shrug, use Facebook in the browser, and claim it’s no different to what they already had. The weak camera is also a bit of a problem here.

Flakiness. Quite often I’ll hit the start button and the Surface will vibrate to show it registered the hit, but does nothing. I have to press again to actually get the start screen. Most of the built-in apps have crashed or wobbled at some point (see the rest of this post). This all spoils the overall experience and feeling of quality. Instead it’s just the usual half-done junk we expect from Microsoft. It’s OK I suppose, and that’s actually a problem.

“Broken” headphones experience on first use.

Summary (TL:DR)

I really want to like it and it’s really close to being a great device. It’s just a shame that the usual Microsoft low-quality and lack of attention to detail are present. I’ll put up with it, but I’m not sure I’ll really love it. On the other hand, it’s only just been released and most of the minor quibbles above can be fixed via updates if Microsoft has the will to improve it.

Friday, October 19, 2012

Windows Deployment Services (WDS, was RIS)

I’ve got a test network with some servers, but not many clients. As the capabilities of the network expand I’m likely to want to be able to try stuff out and that might involve other people, and they will need client machines. I’ve got an old laptop lying around. I decide to use this to install my first, non-virtual, client OS.

I installed Windows Server 2012, thinking I might use System Center to try installing over the network, but on the way I discovered that Windows Server can already do this kind of thing via the Windows Deployment Services server role (used to be called RIS).

I also discover Windows Server 2012 has had a makeover with a new start page, like Windows 8. Most of the tools underneath are the same, but the surface is prettier.

As an aside, in doing this I also found that the default policy for this out-of-the-box domain (created by Windows Server 2008 R2) has a minimum password age of 1 day, so I can’t change my local admin password on this new server until tomorrow. Apparently this is because, with no minimum, a user can defeat a password history check by simply changing their password a few times to get back to their favourite password again. Makes sense, and I plan to leave the default alone, but tripped me up for a moment as it kept going on about password complexity.

After installing the role you then have to configure it. I chose to allow any client to connect, but to require admin approval.

You then need a boot image and an install image. The boot image is the one that is loaded over the network initially, via Pre-boot Execution Environment (PXE), just to do the actual install. It will pull these off the install DVD, so I gave it the Windows 8 ISO (mounted via Hyper-V) that I used earlier for a client install and it found both of the images it needed automatically.

You can’t customise the image at this point, and I don’t want to, but might return to this later.

I then boot my target laptop, with the test network cable attached; spam F12 to get boot options; and choose Boot from onboard NIC. It finds the deployment server via DHCP and then I miss pressing F12 again and it boots the existing Windows 7 installation that’s on the drive. Grrr. Reboot, repeat and this time hit F12 (instructions may vary depending on BIOS). Windows 8 setup begins. I give it my admin logon when prompted and it starts to copy files.  After that the installation is as expected.

Oddly, it doesn’t appear to need approval, although I’m sure I told it I wanted to approve new installations. This can be changed via WDS > SERVERNAME > Properties > PXE Response. The approval requirement is not set (I’m sure I set it during setup), so I set it. I also spot PXE Response Delay which is set to 0, so I change it to 10 seconds (maximum is 28 for some reason), thinking it will give me longer to hit F12 the second time, but, upon reinstalling the client, it doesn’t, so I put it back to 0 again.

Reboot again, and hit F12 and this time I get a message telling me I need to get approval and a place for a message from the Admin (although I don’t see a way to set this message on the server). On the server, under Pending Devices, I can Approve, Name and Approve or Reject. Choosing Name and Approve I can give the machine a hostname and choose a container in Active Directory. On the next page I can choose which image to install (I leave it blank) and I can choose to grant another user rights to join the computer to the domain. I leave this blank too.

The install proceeds as soon as I click Finish on the server to approve the request. The install proceeds as before and I join the domain by giving my admin credentials on the client, but it’s nice to know I can do all this on the server if needed.

Other tabs on the server properties imply I can disable the need to press F12 and set a computer naming convention, and a bunch of other stuff.

Wednesday, October 17, 2012

Installing Exchange 2010 SP1

My next adventure in building my own test environment was to install Exchange so I can mess with email and stuff.

I installed Exchange Server 2010 SP1 from an MSDN image into a virtual machine (VM) running Windows Server 2008 R2. First I used Windows Update to bring down ~90 updates including IE9.

The initial 5-step setup program for Exchange (I shall call this “phase 1”) says it requires .Net Framework 3.5.1 and gives a handy download link which won’t work because you have to install that by enabling the Application Server server role. I did this and accepted the default, minimum dependent bits that it asked for.

Later on I will need IIS 7 I could probably take them at this point and save a step later on. I also had to reboot to get pending changes installed before Exchange would install, so you can save another step by doing a reboot now.

I chose to install just the included languages and not the bundle. I don’t know what the difference is and don’t care right now.

It then copies some files locally and launches “phase 2” of the Exchange setup.

I chose the typical installation because I don’t know what the different Exchange roles do nor which I need.

I gave it an organization name of DevTest; left split permissions unticked (the default); left public folders unticked (default) as I don’t intend to have any Outlook 2003 clients. I also left the Client Access Server unticked as I don’t know what my external DNS entry might be at this point. I assume I can add this role later.

It then does a bunch of “readiness” checks. Some of these are due to pending server changes (from adding the Server Role) so I cancel the setup and reboot.

It also wants the current user to be in the Enterprise Admins and Schema Admins groups, so it can mess with the Active Directory structure, so I add my user to those.

I rerun the install from the DVD and skip through phase 1 again then it copies files again and then tells me it found an earlier install, do I want to carry on with that, click Yes and it skips on to the readiness checks again.

It also needs Microsoft Office 2010 Filter Pack and some parts of the IIS 7 server role. I download the former and install the latter, choosing to only put on the specific IIS 7 role services that it wants (2 authentication services and both compression services). Again, this caused problems later – getting more of IIS 7 installed first would have saved me some steps below.

After a reboot I find 4 more Windows Updates so I let them come down and reboot again and restart the Exchange install again.

This time it goes through the checks OK and does the install. It took ~25 minutes. I gave it the server license key (from MSDN subscription) and rebooted then opened the newly-installed Exchange Management Console to have a look around.

Under Server Configuration > Client Access > SERVER NAME > Properties > General I can see the URL for OWA, but browsing here just gives me a blank, white page.

It turns out that there are a bunch of IIS 7 pre-requisites that the readiness checks don’t check (derp!). Note that you need import-module servermanager before add-windowsfeature will work.

That did it - OWA now works in the browser on the server and in the browser from a Windows 7 client. I’ve not tried an Outlook desktop client yet and the email will only work internally as I don’t have an external DNS entry.

Friday, October 12, 2012

Windows 8

I recently installed Windows 8 on a laptop to get a feel for how it worked on some real tin, rather than the virtual machine (VM) I tried it in before. This is the RTM image from MSDN subscriber downloads, not the preview edition and is Windows 8 Enterprise, EN-UK.

My laptop already has Windows 7 on it, and I didn’t want to lose that, so I decided to try dual-booting it with Windows 8. Actually, a colleague suggested this to me. The last time I tried dual-booting was years ago and was a pain.

Making space to install (and dual-boot) Windows 8

The first problem is freeing up some unallocated disk space. I have a 500GB drive, half of which is unused, but is allocated to my main drive partition. Last time I needed to rejig a drive I used PartitionMagic, but it turns out that Windows 7 can do this itself. In Computer Management > Storage > Disk Management I right-clicked on the C drive and chose Shrink Volume. It had a bit of a think, then I asked it to shrink by 128 GB, which it did, showing me my old C drive and a new lump of Unallocated Space.

Update: I did this on another machine, but first I had to delete some stuff to make space. You then also need to do a defrag, which consolidates your newly-made free space, in order to shrink. The shrink doesn’t automatically move things around it seems.

Burning the image

The next problem is that I downloaded the installation as an .iso image file and need to get it to the laptop at boot time. The laptop has a DVD burner so I inserted a blank DVD, right-clicked the ISO and chose Burn Disk Image. Or I would have, if it were there. I think some other DVD burning software had messed with the file extension associations. I right-clicked and chose Open WIth and then browsed to c:\windows\system32\isoburn.exe. This let me burn the image and the Burn Disk Image is now available when I right-click on .iso files. Again, it’s nice that the tools are just there (sort of) without requiring a bunch of third-party stuff.

Installing Windows 8

With the freshly-burnt DVD still in the drive I restarted the Windows 7 laptop, spammed F12 and chose to boot from DVD. A little blue window appears. And then nothing for 30+ seconds. Hmm. Hung at the first attempt? But no, some little wheeling dots appear to show me it’s still alive.

I chose Custom: Install Windows Only, which hopefully means “install Windows 8, but don’t trash my existing stuff”. It then asks where to put it, and I choose the 128GB Unallocated Space I made earlier. Then I wait a bit while it copies things and allocates bedrooms to the magic pixies or something.

Create a local logon (optional)

I deliberately do not have an internet connection at this point because my colleagues want to see the initial wireless networking connection experience so they know what to expect if users start turning up with Windows 8 devices in the near future.

A this point I have to give it a username and password. If it were connected to the interwebs then I could choose to login using my Windows Live account details instead, but I’m not so I have to give it something local for now. I’ll associate it with my Windows Live account later on.

Dual booting

Windows 8 has detected my previous installation of Windows 7 and has automatically setup a boot-loader. When I reboot the machine I get a pretty, blue menu which lets me choose Windows 8 (the default and will auto-boot in 30 seconds) or Windows 7. I try this and it seems to work – I can boot to Windows 7, reboot again and this time go to Windows 8 again.

Some basic stuff about Windows 8

I’ve summarised some basic stuff in this section which I will then refer back to later on.

The old, familiar Start Menu button has gone. Windows 8 is fronted by the new Metro start page (or whatever they end up calling it). This is designed with touch-screens in mind, but also works with a mouse.

A touch-screen device will, presumably, have a button to get you back to the start from where ever you happen to be. On a laptop the Windows Key (WinKey hereafter) does this. The WinKey is between Ctrl and Alt on my keyboard.

Mousing into the top-right corner of the screen brings up the “charms” menu, which is where some basic stuff such as searching & settings are kept. WinKey+C is quicker, especially if you have a multi-monitor setup as I keep missing the corner and going into the other screen.

WinKey+Q will open up the context-sensitive search charm and is something I use constantly.

WinKey+X opens an old-style context popup menu, but it contains most of the most-useful tools and utilities. This is probably the most important key combo for an experienced Windows user to know.

WinKey+D will get you to the desktop. This is just like the old Windows desktop, but the start menu button has gone – press the WinKey to bring up the start page.

Those apps that have not been updated for Windows 8 & Metro continue to work via the desktop and will install their start menu items as grey tiles on the new Metro start page. This can be a bit of a pain as they all get installed, so installing the driver for my Microsoft keyboard, for example, puts 5 tiles on the start page, of which I will use precisely none. However, it is easy to multi-select them (right click on each) then choose Unpin from Start. You can still access them from the Search charm via the Apps plugin, which is selected for you if you launch search from the start page, so you can re-pin them later if you want.

Wireless networking

I found some basic networking stuff via the Settings charm. I connected to our residential wireless network, which provides internet access, but no access to our core IT systems, and had to give my username with our network domain name prefixed, like: domainname\username. Makes sense to me, but I’m told this wasn’t required previously so could trip some people up.

Switching to the desktop (WinKey+D) I can see, in the notification tray, that I am connected to the network, but have no internet connection. This also makes sense as we run a browser-based logon as well which I’ll need to run through to get a connection out.

I open Internet Explorer and try to go to Google and get redirected to our login page. At this point I get certificate warnings, but I had this when I tried this earlier on Windows 7 so tell it to carry on (twice). It then downloads a little agent thingy that gives me the all-clear and asks me to wait 30 seconds before redirecting to our website. IE times out and cannot display the page. The notification tray still shows no internet connection. In the end it did fix itself, but it took it a couple of minutes.

The certificate problems are a pity, but I think the infrastructure people will get that sorted out.


Now I have the internet again I want to associate my local account with my Windows Live account so I go looking though the options under Charms > Settings. The first page here is about personalisation but it’s all disabled because Windows cannot activate.

WinKey+X > Event Viewer shows me that activation failed because it tried to activate against a local domain controller (which is also an activation server, or something, perhaps). Anyway, this is not what I expected. WinKey+X > System brings up a familiar page, which shows, under Windows activation, at the bottom of the page, that it tried to use an activation key that’s burned into the image (I’m guessing – it’s not one I gave it).

After some research I run “slui 3” from a elevated Command Prompt (WinKey+X > Command Prompt (Admin)). This lets me put in my own key from my MSDN Product Keys page and lets me activate directly with Microsoft.

Linking my local account to Windows Live

WinKey+C > Settings > Change PC Settings > Users lets me associate my local account with my Windows Live account and use my Windows Live email address and password.

This also brings down my account details for Facebook and Twitter automatically, as I already set them up on another copy of Windows 8. My contacts, etc., just come down and are then ready for use.

At this point I’d expect some people to start vaguely muttering about “privacy”, but since it was OK when Apple did it with the iPad, I guess those people can just shut the hell up.

First Impressions

It looks great. I like the new metro style and the managed search is good. Everything is quick and smooth and the UI transitions are nice.

Contact details from Facebook, Twitter, Exchange, etc. are all integrated into a single People app so I can just search or browse in one place to find everyone. Even better is the What’s New feature within People which shows all my friends’ updates from all providers in one timeline. I’d like to also get RSS feed items in this list, but didn’t see a way to do this. A Google Reader plugin would be perfect as I already have my feeds subscribed there, and I don’t think Microsoft have anything similar I could use instead.

The built-in Windows 8 music app works with my Zune subscription which is all tied together with my Windows Live account, so I can just start streaming music. My playlists (My Music\Playlists\*.zpl files on my Windows 7 partition) also work when I copy them over to the same place in Windows 8 (the folder didn’t exist so I had to create it). There’s no option to add the songs to my local collection, but I can just stream the playlist. Bit of a pain to have to go and get each song down again, but maybe I’ll find away around.

As an aside, there’s a minor UX annoyance here. I’d like my playlists decoupled from the physical files and also synced via Windows Live, so they can follow me from device to device. If I have a subscription then I should be able to have it download again to this device. I’d also like to be able to add tracks, even if they are not currently available from the marketplace (like a wish list).

A did have a weird sound problem, in that plugging headphones into the audio jack did not work – sound continued to come from the built-in, tinny, little laptop speakers. After a bit I used WinKey+X > Control Panel > Sounds and had a poke about. It seems that Windows 8 detects the speakers and the jack as two different audio devices and uses the speakers by default. I changed it to use the jack instead and it started to work as expected.

A Metro App for Skype is not available yet, although it seems one is coming very soon.

RSS feeds don’t seem to work if using Metro IE, but do if using IE on the desktop. I also didn’t see an easy way to integrate them

There doesn’t seem to be any built-in integration with Windows Phone 7.5 – I had to install the Zune software to the desktop.

One of the first automatic updates that comes down is the annoying Windows 8 “browser choice” we in the EU forced Microsoft to implement due to some weird idea that it was unfair to bundle Internet Explorer on Windows. It’s pretty ironic that the competition abandoned any idea of browser-agnosticism and all invented their own app stores anyway.

Stuff I have yet to try

Joining the domain.

Office. This is the killer of course. It’s used a lot here and needs to work. I’m sure it’s fine, but I’ve not tried it yet.

Wednesday, September 26, 2012

Excel Keyboard Shortcuts

I use Excel on occasion for data entry, but not enough to really get familiar with the shortcuts. Here are a few that are worth knowing:

F2 Edit the current cell. If you want to overtype, just start typing instead of pressing F2
Ctrl+; Enter today’s date – super handy if you are updating some kind of daily log
= Not a shortcut in the same way, but = tells Excel that the rest of the cell value is a formula, so you can just type a formula and skip the formula editing dialog.
TODO: Cell and cell range format  

Tuesday, September 25, 2012

VmWare Workstation 8 Host-Only Networking

I downloaded a pre-configured vmware virtual machine running SITS on linux with Oracle for training purposes and ran it in VmWare Workstation 8. The VM boots up OK, but I can’t ping it from the host. VmWare is configured for host-only networking using 192.168.243/24 and the IP reported by the VM matches the one I would expect DHCP to have given it: (VmWare leaves the first half of the range for static IPs so we start at 128).

A second VM guest, an old Windows XP box for old browser testing, connected to the same virtual network, can ping the SITS VM. This one has IP, the next one in the DHCP range, so is also as expected.

Windows Firewall is disabled on the host so it can’t be that getting in the way.

Inspection of the IP address of the virtual adapter on the host (Network Connections lists it as VmWare Network Adapter VMnet1) shows something weird: the IP address is not as expected, but is!

I used the Virtual Network Editor in VmWare Workstation to create a new host-only network (VmNet2). This was assigned 192.168.47/24. I shut down the SITS guest VM, changed it’s VmWare settings to use the new VmNet2 and then restarted it. It gets assigned as expected, so it’s on the new network.

The host can ping it! Inspection of the new virtual adapter on the host shows it has been given as expected.

This confirms that a Windows 7 VmWare host can contact guests in a host-only network (I have previously been told they cannot and it only permits guest-to-guest networking, which I have just proven to be false).

So something has screwed up the VmNet1 host-only network adapter configuration on the host. No idea what, but as this is a dev machine it could have been anything including myself.

Monday, September 10, 2012

Getting Started with Windows 8

I’ve installed the Windows 8 preview as a VM and had a bit of a play around. It looks great; a big jump from the usual grey stuff we expect from Microsoft.

The Start button and menu has gone and is replaced by a new start page which has been designed with tablets in mind, but takes a little getting used to if you are still using a mouse. In particular, special menus appear when you put the mouse into the top corners of the screen.

There’s a great post here about getting started with Windows 8 and important keyboard shortcuts which I’ll need at some point.

The author also did a follow-up about simple Windows 8 customisations.

Thursday, August 23, 2012

Computer Names

My test environment is running on a Hyper-V virtual server system. I’ve created an Active Directory Directory Services (AD DS) server running as a guest OS to provide a domain to my other virtual machines.

I do not want my Hyper-V system to join this test domain. It is supposed to host the test environment, not take part in it. So I have left it in the default workgroup.

This leaves me with a minor annoyance, which is that I need a local user account and password when administrating that server. Perhaps it would be better to have the AD domain hosted on separate tin, but it’s not a big enough problem to warrant me finding some at this point.

I also have a couple of guest VMs that are also outside of the test domain. One of these is a Windows 8 preview box, for example. There are likely to be a handful of oddball VMs like this that will need to stand alone.

Connecting to them via Remote Desktop is then a pain because they won’t respond to their machine names so I have to go and hunt around to find their IP v4 addresses and connect with those.

However, this turned out to be because the master browser service is disabled by default in Windows 2008 Server. I have enabled this on the Hyper-V server and started it. I had to wait a few minutes, but after a while I started to see machine names appearing in the results of “net view” (run from the command prompt).

So now I can remote onto the client VMs without having to find their IP addresses.

Wednesday, August 22, 2012

Hardware for a test environment

To create a test environment I’m going to need a variety of different boxes: network infrastructure stuff like Active Directory, DNS, DHCP, web servers, database servers, desktop clients. I’m also going to need flexibility – I might need to test a proposed upgrade to SQL Server doesn’t break anything, for example, so I need to be able to try that out while still being able to get back to a safe state in case it causes problems. If something urgent comes up I can suspend some servers, build another VM and then swap back later.

Hardware virtualisation is the thing for this. I can build a box, stop it and do something else, change it and restore it to a previous snapshot. We use VMWare on our production kit, but as I already have the licensing for Microsoft’s stuff, and no real expectation of being given any help with VMWare, and a vested interest in using Microsoft products, I decided to try Hyper-V instead.

Hyper-V comes as a role within Windows Server 2008 R2. It can also be installed ‘stand-alone’ which is essentially a stripped-down version of Windows with just the bits needed to run Hyper-V, but no user interface, for example. Probably makes sense if you are planning to build your own datacentre with many physical servers to manage and don’t want to waste any performance carrying around a bunch of stuff you don’t need, but without a UI I won’t be able to use any of the virtual guests unless I plug in another machine and rely on the network to get anything done. It just seems simpler and safer to go with the full Windows Server for now.

If you want to run multiple things at once you’ll need the resources to do it. Virtualisation doesn’t magically create additional CPU or memory – it just lets you share what you have across multiple virtual guests.

Our production kit is already groaning under its load and attempts to acquire access to old existing kit didn’t go anywhere. I don’t have enough experience to put a server specification together from scratch. We have an existing procurement arrangement with Dell (and a nice educational discount) so the simplest way forward was to go for the biggest box I could fit under my desk. I also ran the 30 day trial of PassMark Performance Test on a bunch of existing kit to get some idea of what to expect (results further down).

I went for the Dell Precision T7600. For processing power we have an Intel Xeon E5-2687W which has 8 cores running at 3.10 GHz (which shows as 16 CPUs in Windows Task Manager). This was simply the highest specification in terms of speed and cache they had on offer, but the system has capacity to add another one later if I run short. Likewise, I went for 32GB of 1600MHz DDR3 memory. I’d rather have less things running fast than lots of things going slowly. Again there’s plenty of headroom here in future if needed.

For working storage I went for 4 x 10k RPM 900GB SAS drives in a RAID 10 configuration, with a “proper” hardware RAID controller (PERC H710P), to give ~1.5TB of fast storage, which should be able to survive a hard-drive failure, although I’ve no experience of actually trying this (I should test it and pull a drive out so I know what to expect). While solid-state (SSD) is faster it’s far too small. 1.5TB is also a bit small, but was the most I could get without dropping to slower drives. In my experience it’s the drive access that ends up dragging a system down so I’d rather stay as fast as possible here. I can always plug in an external drive (via USB or something) if I want to archive some VMs to free up space on the working storage.

I went for a mid-range graphics card, the 2 GB AMD FirePro V7900. I don’t expect to be doing any gaming on this kit, but it has 4 display port (DP) outputs for up to 4 monitors. I have 2 x 24 inch widescreen monitors for now, but again, it’s nice to know I can add more.

A minor problem here is that the box only came with one DVI to DP adapter so I had to get another so I could plug the second monitor in as the monitors didn’t come with with DP leads.

Here are a couple of graphs showing the performance of the system compared to some of the others we already have around the place.

benchmark - summarybenchmark - disk

I don’t know how accurate these tests are, but it’s a start. Click to enlarge the images. Most of the comparison machines were “dirty” in that they had existing stuff installed and running whereas the new Precision (shown as This Computer, in green) just had the Windows 7 build that Dell put on. The memory, CPU and graphics are good and are on par with a couple of recent Dell machines that were bought for multimedia content creation (video editing, etc, a fairly demanding task). The real shock was the drive performance, which is way better. I’ve no idea if the test is just too easy and so the results are over-reported or whether this is a true reflection of the difference the better drives and RAID actually make. I guess I’ll find out when I start asking it to handle some real load.

Installation of Windows Server 2008 R2 Datacentre Edition (key available via MSDN) was the usual, smooth experience from Microsoft. The only tricky bit was that it doesn’t have drivers for the RAID controller so needed them to be supplied. I did this via a USB stick, but it took a bit of head scratching to find the driver as the only thing listed on the support page for this machine at Dell’s website was the RAID monitoring and control software utility, not the driver. Then I remembered the DVD that came in the box – sure enough, the drivers were on there.

The graphics card drivers also needed to be installed. I did this once Windows was up and running. The driver is fine, but the control panel component that gives access to all the card’s various settings doesn’t work and crashes every time the system restarts, so I’ve uninstalled it for now. It was an optional component anyway so uninstalled OK leaving the drivers installed on their own, which is all I really need for now.

Hyper-V has it’s own Virtual Machine Connection thingy for driving the GUI’s of its guests, but it doesn’t appear to offer multi-monitor support. So this is fine for initial setup of guest VMs and accessing infrastructure VMs (domain controllers, SQL Server, etc), but a bit limited for writing code and running tests.

Remote Desktop (RD) permits multiple monitors, but it depends on the guest RD client version. The one in Windows Server 2008 R2 (my domain controller, DNS, DHCP box) allows both monitors at full screen and resolution. The one in Windows Server 2003 does not – I can only have one monitor, although still at full resolution. Still, this is OK. I only use it to support an old system. New work is done in more recent guest VMs.

As an aside, this old Windows 2003 Server was originally running in VirtualBox, then VMWare Workstation 8, then its disk image was converted and migrated to Hyper-V, where it has been running flawlessly ever since.

My graphics card supports SLAT so can be accessed by the guest VMs, but RemoteFX is needed for this which only works via Remote Desktop and only in Windows 7 Ultimate and better. I can’t see that I’ll be doing much gaming in a guest VM, but I thought I’d try it out. It also supports the pretty aero stuff in Windows 7 and presumably will be needed for all the additional eye candy coming in Windows 8.

hyper-v remotefx server rolesGetting this installed was simple enough. It adds another hardware option when configuring your guest VMs so you can add the RemoteFX graphics adapter to them. On the downside it requires full-blown remote desktop licensing, not just the included two-connection stuff you get for free. MSDN again covers this (I used a key for 20 devices) but you need to install the Remote Desktop Session Host role and Remote Desktop Licensing. See the screenshot (click to enlarge) to see the server role services I installed.

You also need to configure the RD Session Host to talk to the RD Licensing server even though it’s the same box. You do this via Server Manager. However, adding the RD License key isn’t done here – you need Administrative Tools > Remote Desktop Services > Remote Desktop Licensing Manager for that. Not a big deal, but a minor UX niggle.

A colleague has created a virtual LAN and given me an address range to use and a gateway (with built-in firewall) with internet access.

So, Hyper-V is installed and my first, stand-alone, VM is operational. Now I need to build myself some virtual servers.

Wednesday, August 8, 2012

IE Keyboard Shortcuts

A quick cheat-sheet of the shortcuts for things I use a lot in IE9:

Ctrl+T / Ctrl+N Open a new tab / window
Ctrl+W / Alt+F4 Close current tab / window
Alt+Home Go to your homepage
Alt+D Edit current web address (URL)
Ctrl+E Web search
Ctrl+F Find on current page
Ctrl+= / Ctrl+- / Ctrl+0 Zoom in / out / 100%

Someday I might write something that watches what you do and suggests the appropriate shortcut to you.

Tuesday, July 24, 2012

SharePoint / SQL Gotcha: Massive Log Files

My backup scripts on my test SharePoint 2010 box have been running but not producing backups for the last few days. I tried a manual backup via Central Admin and found that the backup estimate was more than 10GB, which is odd for a test server.

A bit of hunting with Sequoia View showed that SharePoint_Config.ldf was more than 10GB (the database data file itself was only 100MB).

It seems that the database was set to the Full Recovery model, which I’ve been bitten with before. In this mode SQL will not throw away the transaction log after a database backup, you have to backup the transaction log as well. If you do a lot of updates to the same data you can end up with large log files (compared to the actual data file).

Thinking about why you might want this makes my head spin a bit. Presumably if you have the previous backup plus the log file you can recover anyway – you just need to get the log off the server in case it goes bang. I guess if you have all the transactions you don’t even need the data file backup – you could rebuild to any point from the accumulated transaction logs. I’m sure there are lots of useful things you can do in this mode, but I don’t know of any so I don’t “need” it at the moment.

In SQL Server 2010 R2’s Management Studio you can view the properties of a database and see how large the files are. You can also use Tasks > Shrink > Database and Tasks > Shrink > Files to see how much space is available in a file (SQL keeps some free space and can auto-grow when it gets low so you can strike a balance between “wasted” free space and disk fragmentation.

The Shrink dialog told me that the log had 0% free space available. I tried a transaction log backup (Tasks > Backup > Backup Type > Transaction) but there wasn’t enough free disk space for it (failed with error 112, but couldn’t give me a descriptive message). Oh well, I don’t need it as it’s a test box and I can stand to lose some data if I need to do a restore. My very simple PowerShell scripts will get SharePoint to do a full weekly backup and daily differential backups so I should be good if something goes wrong – I think I’m only exposed for up to a day’s loss (assuming I notice if the backup itself fails – there’s no error reporting in the script at the moment).

I’m mainly just playing with the SharePoint installation – I know there are third-party tools that will automate this for me and I know that Data Protection Manager (or whatever it’s called now) can do automated SQL Backups, for example. I’m just interested in what you can easily do out-of-the-box.

Anyway, I set the SharePoint_Config database to the Simple Recovery model, and then using Tasks > Shrink > Files, I could see that now 99% of the log file was available. Shrinking it recovered that space, freeing up 10GB.

While I was there I set the model database to Simple Recovery too so any future databases created on the box will “inherit” that. I also set all the databases that were Full recovery to Simple. It turns out there was a 50-50 split. I’m not sure why some were already in Simple mode. Possibly SharePoint will set some non-critical things to Simple by default and leave the reset to “inherit” from the model database?

So a sort-of lesson learned is to watch out for Full Recovery model databases in future. If you need this, you also need to figure out what to do with all those transaction logs.

In future SQL Server and SharePoint installations I will need to watch out for default options that I might have chosen badly. It seems to me that new databases should use Simple Recovery by default – Full Recovery is more an advanced option. Maybe this is down to the edition of SQL Server that was installed?

Tuesday, July 17, 2012

Exporting from Active Directory

I recently needed to get a dump of users from Active Directory to analyse the department field values because we changed some recently and now some users have lost access to the call logging system we use (Vivantio).

This was surprisingly fiddly to achieve with the tools available to me, so I thought I’d write it up for future reference.

You can get at the users via the built-in Active Directory Users & Computers tool (dsa.msc). This will already be on Windows servers running Active Directory (domain controllers for example), but can also be installed onto a workstation via Remote Server Admin Tools (RSAT).

Using Active Directory Users & Computers, select a container in the AD tree. If your users are in multiple containers (multiple organisational units (OUs) for example) then you’ll need to repeat this for each as I didn’t find a way to list several at once.

To get the department field showing (there are lots of others available too, but not everything) use View > Add/Remove Columns.

To remove groups and disabled users (for example) use View > Filter Options. The tool will help you to build simple queries, but to screen out the disabled users we need to use an LDAP query, so choose Create Custom Filter > Customized > Advanced and enter the following:


You can then export the users to file by right-clicking on the selected container and choosing Export List. I changed the file format to Unicode Text (Tab Delimited). I tried Comma Delimited first, but some of our departments contain commas which messed up the import into Excel.

I opened the file with Excel (via File > Open) which walked me through the import process.

I inserted a Pivot Table and dragged Department into the Row Labels box and Name into the Values box (this was automatically converted to “Count of Name” by Excel). Excel lists all the departments and the count of users in that department. Double-clicking a department name will ask what to display next (or just drag another row name into the Row Labels box). I chose Display Name, so expanding a department lists the names of the people in it.

From this it was easy to spot users that had incorrect or unusual department values.

Thursday, July 12, 2012

MSDN & Campus Agreement

TL;DR – you can get the top-end MSDN license, which permits use of pretty much any Microsoft product for software development, for ~£350 per year under the Campus Agreement.

I’ve been in my current role for about a year. An on-going issue is that we don’t have much of a test environment, which means every change is in some sense a “live” change and therefore a risk. Even well understood changes carry some risk, but software development (and perhaps learning in general) is a destructive thing – I need to try things to see what happens and some of what happens might be “breakages”.

The way to handle this is to have another environment that isn’t live and which is OK to smash up and rebuild as required. This seems to be generally understood and agreed, but no such environment has been forthcoming.

So, plan B then: build my own. My boss has given me the go ahead to get a good workstation (more on that later). Actually, I’ve already got a good laptop, but Visual Studio 2010 (with Resharper) just grinds along slowly and VMWare Workstation 7 isn’t exactly fast on it either. The CPU & memory seem ok, but the laptop has picked up anti-virus, SCCM and Zenworks clients and I suspect these all drain precious resources.

On the hardware I will need software. I have previously had an MSDN subscription and am generally aware that this is the right thing to have for software development on the Microsoft platform. It comes in a variety of flavours, but the top-end one (Visual Studio Ultimate 2010 with MSDN) retails for ~£7500 for the first year and £2500 a year thereafter. For this you get access to all the development tools and all the server stuff so you can write and test pretty much anything you want. But that’s still a fair size chunk of money.

I had previously learned that we get a good discount on Microsoft licenses via our Campus Agreement, so I sent an email off to our supplier – Pugh Computers.

I was told that it would cost a bit less than £350. That’s quite a saving.

That’s per developer, per year. Because the Campus Agreement is a yearly subscription we don’t get the perpetual usage rights that the retail MSDN gives you, but that’s not really much of a loss unless you want your development environment to go stale.

This was duly ordered and the subscription delivered via our Campus Agreement logon. It was then assigned to me by email and I now have access to the MSDN downloads & key generation pages.

UPDATE 1: When we assigned the MSDN subscription from the Campus Agreement website we ticked an optional boxed marked “media” or something. Today, a small pouch was delivered containing DVDs with all the latest Microsoft products, including Windows 2008 R2 SP1, Windows 7 Ultimate, Office 2010, Visual Studio 2010, SharePoint 2010. Sweet – saves me downloading them and burning them to disk myself.

Thursday, July 5, 2012

Home Routers

I’ve had home wifi routers from both LinkSys (later bought out by Cisco) and Netgear and been underwhelmed with both. Poor wifi range, dropped connections, etc.

Recently Cisco attempted an evil change of terms & conditions on people who already own their routers, so they might be a firm to avoid if at all possible.

I’ve not owned a D-Link router. They may be OK I suppose.

However, Jeff Atwood recommends using open firmware, such as DD-WRT, OpenWRT & Tomato, because it’s better quality and can be fixed & upgraded. The off-the-shelf stuff can also, in theory, but why would Cisco, etc, spend time making the thing you already bought better, when you could be out buying a more up-to-date version instead?

I’m especially interested in QoS, so I can prioritise Xbox gaming traffic, for example. I’d also like to explore the option of a private VPN. Some decent traffic logging would also be useful.

So, I guess I better see if my current routers will work with one of these.

Friday, June 29, 2012

Restore Content DB–SharePoint 2010

I “accidentally” deleted my default root site on my test SharePoint 2010 farm. Oopsy. As I was testing the backup functionality yesterday I thought I might as well try to do a restore. It didn’t work out-of-the-box, although I think I got there in the end.

This is a farm installation, not the single-box installation option, but all on one box so we can add others later if necessary. It’s SharePoint 2010 on Window Server 2008 R2 (no service pack) with SQL Server 2010 R2.

The farm was built a few weeks ago and has little content or use, so should be fairly easy – it’s not like we have heavily customised it or anything.

I did a full backup yesterday, so restoring to that should bring back the site I just killed.

SharePoint restore lets me select my backup and then choose just the bit I think I need to restore: the WSS_Content database. I choose to restore it using the existing configuration, so it should overwrite the current database.


A few minutes later the job finishes with an error message. The log shows the database restore completed ok, but OnPostRestore failed. Pointing my browser at the root site shows it’s not there – the restore hasn’t worked.

[6/29/2012 11:20:27 AM] Verbose: Starting OnPreRestore event.
[29/06/2012 11:20:27] Verbose: Starting object: WSS_Content.
[6/29/2012 11:20:28 AM] Verbose: Starting OnRestore event.
[29/06/2012 11:20:28] Verbose: Starting object: WSS_Content.
[29/06/2012 11:20:28] Verbose: [WSS_Content] SQL Server Connection String: Data Source=SPTEST01;Initial Catalog=WSS_Content;Integrated Security=True.
[29/06/2012 11:20:28] Verbose: [WSS_Content] SQL command started at: 29/06/2012 11:20:28. This command may take a while to complete and without notification.
[29/06/2012 11:20:28] Verbose: [WSS_Content] SQL Server Command:
IF EXISTS ( SELECT * FROM master..sysdatabases WHERE has_dbaccess(name)=1 AND name=@db_name )
    @db_location=c:\backups\sharepoint\AutoWeeklyFull\spbr0000\000000B4.bak, @db_name=WSS_Content
[29/06/2012 11:20:28] Verbose: [WSS_Content] SQL command timeout is set to 1.00 hours.
[29/06/2012 11:20:30] Progress: [WSS_Content] 5 percent complete.
[29/06/2012 11:20:30] Progress: [WSS_Content] 11 percent complete.
[29/06/2012 11:20:30] Progress: [WSS_Content] 15 percent complete.
[29/06/2012 11:20:30] Progress: [WSS_Content] 21 percent complete.
[29/06/2012 11:20:30] Progress: [WSS_Content] 25 percent complete.
[29/06/2012 11:20:30] Progress: [WSS_Content] 31 percent complete.
[29/06/2012 11:20:30] Progress: [WSS_Content] 35 percent complete.
[29/06/2012 11:20:31] Progress: [WSS_Content] 41 percent complete.
[29/06/2012 11:20:31] Progress: [WSS_Content] 45 percent complete.
[29/06/2012 11:20:31] Progress: [WSS_Content] 50 percent complete.
[29/06/2012 11:20:31] Progress: [WSS_Content] 56 percent complete.
[29/06/2012 11:20:31] Progress: [WSS_Content] 60 percent complete.
[29/06/2012 11:20:31] Progress: [WSS_Content] 66 percent complete.
[29/06/2012 11:20:32] Progress: [WSS_Content] 70 percent complete.
[29/06/2012 11:20:32] Progress: [WSS_Content] 76 percent complete.
[29/06/2012 11:20:32] Progress: [WSS_Content] 80 percent complete.
[29/06/2012 11:20:32] Progress: [WSS_Content] 86 percent complete.
[29/06/2012 11:20:32] Progress: [WSS_Content] 90 percent complete.
[29/06/2012 11:20:32] Progress: [WSS_Content] 96 percent complete.
[29/06/2012 11:20:34] Progress: [WSS_Content] 100 percent complete.
[29/06/2012 11:20:34] Verbose: [WSS_Content] SQL Server Message: Processed 6528 pages for database 'WSS_Content', file 'WSS_Content' on file 1.
[29/06/2012 11:20:34] Verbose: [WSS_Content] SQL Server Message: Processed 2 pages for database 'WSS_Content', file 'WSS_Content_log' on file 1.
[29/06/2012 11:20:36] Verbose: [WSS_Content] SQL Server Message: RESTORE DATABASE successfully processed 6530 pages in 4.654 seconds (10.960 MB/sec).
[29/06/2012 11:20:36] Verbose: [WSS_Content] SQL command completed at: 29/06/2012 11:20:36.
[29/06/2012 11:20:36] Verbose: [WSS_Content] Verifying that the database restoration is complete.
[29/06/2012 11:20:36] Verbose: [WSS_Content] SQL Server Command: USE [master]
                        SELECT status FROM master..sysdatabases WHERE name=@db_name
[29/06/2012 11:20:36] Debug: [WSS_Content] Database status is 65536.
[29/06/2012 11:20:36] Verbose: [WSS_Content] SQL Server Command: SELECT TOP 1 1 FROM [WSS_Content]..sysobjects
[29/06/2012 11:20:36] Verbose: [WSS_Content] Database restoration has been verified.
[6/29/2012 11:20:36 AM] Verbose: Starting OnPostRestore event.
[6/29/2012 11:20:36 AM] Verbose: Starting object: WSS_Content.
[6/29/2012 11:20:36 AM] FatalError: Object WSS_Content failed in event OnPostRestore. For more information, see the spbackup.log or sprestore.log file located in the backup directory.
    SqlException: Cannot open database "WSS_Content" requested by the login. The login failed.
Login failed for user 'MYDOMAIN\SharePointAdminUserName'.
[6/29/2012 11:20:36 AM] Debug:    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection()
   at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
   at Microsoft.SharePoint.SqlRemoteBlobSession.CheckRbsInstalled()
   at Microsoft.SharePoint.Administration.SPRemoteBlobStorageSettings.Installed()
   at Microsoft.SharePoint.Administration.SPDatabase.OnPostRestore(Object sender, SPRestoreInformation info)
   at Microsoft.SharePoint.Administration.SPContentDatabase.OnPostRestore(Object sender, SPRestoreInformation args)

Boo. Hiss. Out-of-the-box (OOTB) functionality not working. The account is the farm admin account which was used to install the SharePoint farm. There’s no way it doesn’t have enough rights and, sure enough, they look ok to me when viewed with SQL Server Management Studio. That account is a server admin and has the db_owner role on the database.

I try again, this time choosing to restore WSS_Content to a new name: WSS_Content2. This also fails in the same place, but with a different error message.

[29/06/2012 11:56:14] Verbose: [WSS_Content2] Database restoration has been verified.
[6/29/2012 11:56:14 AM] Verbose: Starting OnPostRestore event.
[6/29/2012 11:56:14 AM] Verbose: Current object: WSS_Content2 (previous name: WSS_Content).
[6/29/2012 11:56:15 AM] FatalError: Object WSS_Content2 (previous name: WSS_Content) failed in event OnPostRestore. For more information, see the spbackup.log or sprestore.log file located in the backup directory.
    SPException: Cannot attach database to Web application. Use the command line tool or Central Administration pages to attach the database manually to the proper Web Application.
[6/29/2012 11:56:15 AM] Debug:    at Microsoft.SharePoint.Administration.SPContentDatabase.OnPostRestore(Object sender, SPRestoreInformation args)

I guess that might be because the existing database is still configured and the new copy can’t co-exist, so I delete both the new database and the existing one using SQL Server Management Studio, so both WSS_Content2 and WSS_Content are gone. (It’s just a test box – a reinstall from scratch is possible if this doesn’t work).

This time it works, although the SharePoint Central Admin (CA) GUI is showing the previous error status with the successful restore log underneath. Still, this is the usual level of shoddyness that I expect from big fat Microsoft products so am unfazed.

Monday, June 18, 2012

Mobile Frame Zero

WP_000106Here is my first attempt at a mecha for Mobile Frame Zero, made with Lego I had as a child. This was primarily an initial investigation into simple joints as these will be important in any mecha. I got my initial ideas by looking at some of the mecha designs on Mobile Frame Hangar.

Firstly, you can get quite a lot done with single-pip pieces. They give a single degree of freedom because they join with a single peg in a hole, so can be rotated. The tops of the legs, for example, are just single-pip blocks, so can be turned, and the feet have a single pip on the top, so they can be rotated to make it look like the feet point in or out, which also improves stability.

The legs join the torso via a combination of a Mini Handle (3839) (a 2x1 plate with two poles) and Lamp Holders (4081).

Note: The Lego PickABrick website sells new, individual bricks, but won’t let me link to the parts directly (javascript: how not to do it). So I’m linking to BrinkLink instead, but I’ve included the brick name and design identifier from the Lego site so you can search there if you prefer.

The shoulders are a combination of Space Positioning Rockets (3963) (details not available on PickABrick) and Angular Bricks 1x1 (4070), although there are many other parts that could do the same job. Note the the rocket parts provide mountings to the side (for the arms) but also to the front and rear, giving a way to add all sorts of other systems to the mecha.


I bought into the Mobile Frame Zero Kickstarter via Penny Arcade. I liked the idea of a table-top dice-based battle game which uses Lego bricks as the protagonists and well as the scenery, but I was also interested in Kickstarter itself as a new (to me anyway) way of funding things.

Traditionally you either pay up front for things or you get them “free”, but stuffed full of adverts. Either way, someone else invested capital and is now trying to make profit (Return on Investment or ROI). With Kickstarter you can choose to help fund something up front (cloud-sourced capitalism maybe).

In this case the project has also declared that the output will be open-sourced, which gives it a sense of purity – once the funding has achieved its objective (to create the game rules in this case) the product will be given away, so nobody (or everybody, if you prefer) can exploit it. Cloud-sourced patronage, perhaps?

Maybe this model could be adapted for music and film? A band pledges to write some music (or release some they already have ready to go) and once enough backers fund it the piece or album is written and released. Given that the band were paid up front there’s no need for copyright. Some people will benefit from the piece without paying, but what comes around goes around – there will be other pieces that you didn’t fund that you come to benefit from too. You also get to influence what gets done more directly than the traditional market system where investors take ‘risks’ (or more likely don’t, preferring to rehash the same pop culture ad nauseam) and then hope to exploit them afterwards. Here the money goes directly to the stuff you actually want to see. And after, maybe your name stays on a permanent list of backers as a testament to the stuff you helped create (even in only a small, remote way).

Wednesday, June 13, 2012

Remote connections to SQL Express

I can connect to my SQL Express server from Management Studio while remoted onto the server, but couldn’t connect to it from my workstation from Management Studio. This is v 10.5.1600.1, which is SQL Server 2008 R2.

I confirmed all the steps in the following post:

I confirmed that it wasn’t a SQL permissions thing, because I’m using the same credentials I used when connecting on the server.

Still no luck. Connecting to servername\sqlexpress fails with:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

On a whim, I tried connecting to just the servername without the instance name. Success. It looks like SQL Express thinks it is the default instance. I don’t know how it was installed. Maybe this was intentional.

I did also set it to respond to the default SQL Server port (1433) mainly because, when following the instructions in the blog post linked above, I couldn’t think of another port number to use so just borrowed the standard one (there’s no other SQL instance on the server).

If I am logged on to the server via remote desktop, I can connect to either servername or servername\sqlexpress. From my workstation only servername works.

TL;DR: Try connecting to the default instance if your named instance won’t respond, just because it might work anyway.

Wednesday, June 6, 2012

Chicken of the Woods

WP_000120I spied this on my route to work, just outside of Crudgington, Shropshire, in early June 2012, growing on the north side of an oak tree. It’s a cluster of sulphur polypore, commonly called Chicken of the Woods. It was fresh, solid & heavy with water. I took a photo of it then broke off a large piece to examine at home.



The top side has orange bands and the underside is a vivid yellow.

WP_000122  WP_000123


I sliced some up into ~1cm wide strips and then lightly fried them in olive oil. The strips take on a golden colour during the frying and were delicious, having a firm, meaty texture and a chicken-like flavour.