Launch PowerShell with AutoHotkey

Sometimes nerds like me just need to open PowerShell as fast as possible.

This is very easy to achieve thanks to AutoHotkey – a very popular desktop automation application for Windows.

First install AutoHotkey from their website. Modern Windows machines just want the x64 + Unicode option when installing, if in doubt check their help documentation.

Once you’ve got it installed you need to create a new file for the script. For me, I created a new file called PowerShell.ahk in my scripts directory using gvim – but you can use your editor of choice and place it wherever you like.

Inside the file enter the following script:

   Run, PowerShell

The # is the symbol used for the Windows key, the + is the symbol used for shift, and the p stands for PowerShell. On then next line I’ve put Run, PowerShell and that’s it.

This means we are set up to run PowerShell when we press WIN + SHIFT + P.

Obviously you can do a lot more than just this, and for me starting PowerShell like that is not enough – I really dislike that blue background they use by default.

I have already set myself up with a nicely customised shortcut to PowerShell which I keep in my scripts folder and syncronise across machines. This includes the font and colour options I prefer.

   Run, C:\Users\Julian\Scripts\PowerShell.lnk

However you decided to script it, you just need to double click the PowerShell.ahk file when you’re done and AutoHotkey will register the combination for you.

There you have it! A super fast way to bring up a PowerShell prompt whenever you need it.

Microsoft Future Vision 2015 – Redux

Back in April I wrote about the latest ‘Future Vision’ video from Microsoft and I was very pleased to see this video come back onto my radar.

Dave Jones and Anton Andrews

Larry Larsen at Channel 9 posted an interview with Dave Jones and Anton Andrews – a couple of the guys who worked on creating this fantastic (yet realistic) vision of the future.

Dave and Anton give us some context on the decisions and thoughts behind the various ideas, including a few extra details about my favourite concepts – the flexible digital notebook and the wrist device.

Future Vision

It’s well worth watching if you are interested in these forward looking concepts, but make sure you watch the Future Vision video first!

Something I had missed when watching the original video was the idea that the system itself had noticed Kat had gone into a flow state. The suggestion here is that the various devices would work together, taking sensor information like heart rate and galvanic skin response, to automatically switch into this mode.

Automatic Mode Switching

The system would then automatically block out any unwanted distractions like notifications and set her communication status to do not disturb.

A nice touch is that the earpiece also switches to red to show other human beings. Very cool.

In The Flow State

As a software architect and technology enthusiast I find myself bombarded with huge amounts of information – communication requests, push notifications, reminders, and much more.

Getting myself into the flow state is hard enough (music helps) but keeping it can be even more difficult. The idea of having the system automatically sense this and move things into a ‘do not disturb’ state is very attractive.

An important part of these Future Vision videos is that they are realistic, and all of this could be done today:

  • Notice high amounts of use in productivity apps (Office, Visual Studio)
  • Sense physical changes in the user (Band)
  • Set ‘Quiet Hours’ for notifications (Windows)
  • Change status to ‘Do Not Disturb’ (Skype)
  • Handle exceptions that can break through (Cortana)

Microsoft controls each one of those components, but the fact is that the most futuristic part of these videos is not the hardware or the software – it’s the integration.

Considering Microsoft reaffirmation as the productivity company, it’s probably something they should try to integrate in order to achieve their goal.

Being productive on Windows 10

I thought I’d write down some of my thoughts on how I’m productive on Windows 10 now that it has been out for a little while and all of my machines have been updated.

Including my phone and 7 inch tablet, I run Windows 10 on four machines:

The following discussion is only about the first two, which are both configured to be general purpose devices used for all sorts of tasks, including development and productivity. I’ll write about the phone and tablet another time.

Windows 10 Desktop

With Windows 10 the desktop is back on the PC and, as usual with my computers, there are no icons in sight. I use my desktop for temporary things, not as a place to keep anything for any extended amount of time. If I’m downloading a file to run it through a comparison tool or something like that, my desktop is fine.

I’m still using teal as the main colour for the user interface. I have used this on my workstations for a number of years now and, with Windows 10, the colour configuration is better than ever. You can choose to have it just as a highlight colour on top of black or have variations of the colour used throughout the Start Menu and Action Centre UI. I prefer the latter with this colour choice.

I feel like teal has worked really well for me, it’s fairly conservative and seems to fit into multiple uses really well:

  • It is not too bright, and offers good contrast with both black and white
  • It works well in both cool or warm lighting environments
  • It doesn’t become too saturated when used with high F.lux settings

For my Surface, I have selected a nice ultra-wide space wallpaper which fits nicely with the colours I choose. This has been a real favourite of mine since I first started using it, but I am unsure who the original artist is. I’d love to give them credit.

Windows 10 Taskbar

I have no applications pinned on my taskbar so I get a really clean environment when I have nothing open. I launch all of my applications from the Start Menu or PowerShell.

I’ve loved using live tiles since they were first introduced on the phone. I enjoy the benefits you get from the glanceable information and I find the grid based organisational structure is way more useful than just a menu. My initial thoughts were that having the Start Menu in the corner may not be as good as having it full screen like on Windows 8, but I quickly changed my mind as soon as I started using it on the insider previews.

Right now, I have grouped the tiles into four main sections with the bottom right configured slightly differently depending on which machine I’m using.

Windows 10 Start Menu

My current setup of tiles and most used applications is pretty much a snapshot in time though – I don’t feel like I have had enough time to really know what I want to have pinned here. At the moment I’m enjoying having a mixture of glancable information (Weather, Calendar, etc.) unread content counts (NextGen Reader, Mail, etc.) and launcher icons (Edge, Store, etc.).

I’m certain this will change quite a lot with use.

Windows 10 Cortana

Cortana has been a very welcome addition to the PC. I’ve been using Cortana on my phone since the original previe, and she’s very much a part of my computer use now. She has had numerous improvements over her first iteration and now that she’s available through all my personal Windows devices, using her for things like reminders and glanceable information has been easier than ever.

I use her on my Surface quite a bit, though I do sometimes have trouble with her listening to me when I say ‘Hey Cortana’, so I usually just press WIN + C to activate her, then she has no trouble understanding my requests.

All of my requests are typed when I use the Virtual Machine. Typing requests is as easy as pressing the Windows key. I find typing to be just as natural as speech, and really fast when I’m using a desktop keyboard. I also tend to use the VM when I’m in locations where speaking wouldn’t be very useful anyway.

I have had issues with using the location-based features on the VM, but I worked around it using a Fake GPS driver.

The Task View is a another new addition to the Windows task bar, and even though I regularly use the key combination WIN + TAB to activate it, I still like to have the icon on the task bar anyway. This screen also includes the ability to add a number of virtual desktops. Surprisingly, I don’t use virtual desktops as much as I thought I would – but I am really glad they there when I do use them.

I originally thought I would always split things out every time I used the computer. For example, I thought that all my communications apps would always be in one desktop and development apps would belong in another. It just didn’t really happen that way. As I was regularly switching between them, I quickly got confused when I had more than a few apps open.

Virtual desktops become useful for me when I really want to concentrate on one or two different activities. I move their windows around on the Task View and put them into their own desktop to get a distraction fee environment when I need it. Ad hoc desktops to help me focus have been much more useful than trying to set rules for myself.

CTRL + WIN + LEFT and CTRL + WIN + RIGHT are used to switch back and forth between desktops. (I’d like to see better support for this with a three finger swipe on the trackpad please Microsoft!)

Windows 10 Notification Area

The Notification Area has been shuffled around a bit in Windows 10. The keyboard icon is now integrated and right next to the clock, and there’s now an additional new notification icon for the Action Centre.

I only show the very minimum of icons here – Process Explorer, Power, Network, Sound. I often use a FuzzyClock application to change how the time is displayed down here too. I am not a fan of using the notification area as a place to minimize windows, or launch applications.

Process Explorer is Microsoft’s ultra-nerdy replacement for the Task Manager and something I always use on my Windows machines. I find it to be way more detailed than the built in version and it includes many features developers find useful. As you can see from the screenshot, you also get a glanceable indicator of CPU usage here too. I find that CPU usage is often the most important metric for how the machine is doing, as I don’t really care how much RAM is being used unless I am having problems with something. If I do have problem, full access to everything running on the machine is just a click away.

Windows 1`0 Action Centre

Action Centre is a welcome addition to Windows on the PC, and something I’m already well used to using, thanks to Windows Phone. The version that ships today is not perfect though. Over time I’d like to see better notification sync with the phone. I also find that the having a solid icon isn’t enough to really draw attraction to the fact there is a new notification pending. I’d like to see options here for flashing or some other more substantial indicator, though I have to admit, I probably wouldn’t want it to be like that all time.

In fact, when I’m trying to be super productive, I turn on Quiet Hours. I use this in combination with the Quite Hours feature on my phone to ensure I don’t get annoyed with notifications when I don’t need them. But they’re still a click away.

The utilities I have mentioned above, like FuzzyClock and Process Explorer, are tiny portable executables and don’t require some system-changing installation mechanism. All these small applications I use are stored in a Scripts folder I have been maintaining for years.

This folder lives in my profile under C:\Users\Julian\Scripts and is synchronised to a private Git repository hosted on Visual Studio Online. Inside there are a number of scripts to run automated tasks and setup my PowerShell profile to be exactly the same across machines. In addition to these scripts, there’s a Tools folder which contains all of these small utility applications as well as some larger applications which have been modified to work in a ‘portable’ way.


I spend a lot of my time in PowerShell and this folder is absolutely fundamental to how I complete many tasks on my Windows machines including, but not limited to:

  • Scripting languages and runtimes – Ruby, Python, IKVM
  • Text editors and UNIX utilities- Vim, grep, wget, curl
  • Windows Tools – Process Explorer, Autoruns
  • General Utilities – FileZilla, Far, WinMerge, Putty
  • Plus years of PowerShell and F# scripts, registry files and more

I could probably go into more detail around this in the future. If you are interested, let me know in the comments.

Not everything is installed this way though. Some of the biggest applications I use require installation from the web through subscriptions, like Office 365 and MSDN:

  • Outlook, OneNote, Visio and the rest of Office (from Office 365)
  • Visual Studio Enterprise (from MSDN)
  • Visual Studio Code, Node and Git (free)
  • Wunderlist, Slack and Skype (free)
  • 7-Zip, F.lux, Paint.NET (free)

And finally, there are a number of applications which either are preinstalled on Windows or I have to install from the Windows Store. The ones I use the most are:

  • Groove Music, Film & TV, Photos and other entertainment apps
  • MSN apps like Weather and Sports
  • Audible, Netflix
  • NextGen Reader

Applications installed through the Windows Store are super painless. I wish more applications could be installed this way. I’d like to see more parity with the phone too, and I’m sure that’ll be coming when Windows 10 Mobile ships at the end of the year.

Overall, I feel like I’m more productive on Windows 10 than I have been on any other operating system. I feel like things are only getting better in general – with things like SSH and containers coming soon, the future is pretty bright for Windows 10.

Using Cortana with a fake GPS driver on Windows 10

I’ve mentioned before that I like to offload some of my development and productivity tasks to Virtual Machines running on Microsoft Azure. On these machines I like to run Visual Studio, Office and any other apps I need so I can be productive anywhere.

One of the apps that helps me be productive is Cortana, so I was pleased to get her up and running on my Windows 10 VM.

Cortana can helpfully give you reminders and recommendations based on location, but can you guess what the problem is when using Cortana on a VM in Azure?

Location in Redmond

The location services think I am currently located in Redmond, Washington. Oh dear.

The cross devices functionality of Cortana gets very confused because of this. When I’m using my phone she thinks I’m in Leeds, but if I switch to using the VM she thinks I have suddenly appeared in the United States.

I had a think about how best to approach this issue, and currently I’m trying out a solution which seems to work well: using a homemade Fake GPS driver.

FakeGPS Sensor Driver

I went through the code in the Windows DDK and found an example for creating a GPS driver. Rather than getting the data from a real hardware devices, I hard coded the latitude and longitude. Once I had it set up in exactly the way I wanted, it was just a matter of compiling the C++ for Windows 10 and getting it installed.

Location in Leeds

Now this Fake GPS driver simply returns the geolocation coordinates which I want, and Cortana thinks that I’m in Leeds. Sorted!

This isn’t a perfect solution. For example you have to switch your OS to run in Test Mode, and obviously the location doesn’t automatically change depending on where you are. However my initial use shows me it’s way more useful than just letting the OS guess the location from the IP address.

Cortana on Windows 10

If people are interested in trying out this solution for themselves, I’ll share the code on GitHub. It shouldn’t be too tricky to add an interface to set the location as required.

Let me know in the comments.


It’s on GitHub at

Highlights from Build 2015

The Build 2015 conference has just taken place in San Francisco.

Like last year, this has been another huge event for Microsoft, and a big deal for the people who build solutions using their technologies.

There have been way more interesting things happening than I can possibly cover in one article, but I have decided to cover the three most important to me:

.NET, Windows and Azure.

An exciting future for .NET and Open Source

The future of .NET is the continued push to an open source .NET Core, which is at the centre of both the latest ASP.NET runtime and the Universal Windows app platform. In the future, this will expand and include other application types. In my opinion, they’ve picked the right place to start.

Applications running on the CoreCLR can be developed and deployed on cloud and server-based infrastructures running different operating systems including Windows, Linux and OS X. I have been watching the development efforts on GitHub for a while now, and I’ve set it up on my own machines running both Windows and Linux. It sure is a sight to see.

As well as the core runtime itself going open source, other technologies like Roslyn have enabled products that many wouldn’t have guessed would see the light of day. Having an open source compiler platform has enabled Visual Studio Code – a new cross platform text editor with Intellisense – to be built.

I was lucky enough to see Visual Studio Code before it was announced, and it changed the way I thought about collaboration with Mac users instantly. I’ll have more on this new text editor soon.

Visual Studio Code

With the RC of Visual Studio 2015 there have been some big improvements in the languages supported including both the more traditional C# and Visual Basic, and (my personal favourite) F#.

The Visual F# improvements in ‘every day’ activities are dramatic for anyone who has been using the language. This is all thanks to the new open source attitude, and the amazing community around F# who have helped to develop the Visual F# tools on GitHub.

This new world of cross-platform and open source .NET technology is going to enable some amazing scenarios for .NET developers like myself.

Windows 10’s application platform takes shape

The aforementioned Universal Windows app platform is really taking shape now. Gone are the days of very prescriptive (and maybe too forward-looking) design patterns of Windows 8, and in is the ‘do what’s right for your applications‘ model that has been working well for some for a while.

Universal Windows apps scale from the smallest phones and Internet of Things devices up to the large screens of the Xbox One and the Surface Hub. The most ‘universal’ of these apps are built with just one binary which includes a scalable UI. This allows you to even have the ‘desktop’ app experience when used on a landscape 5.7 inch phone, or when plugged into an external screen using an amazing new Continuum for Phones feature.

For app developers there are some interesting (and controversial) new ways for software venders to build for Windows. The biggest of which are the bridges from Android and iOS. These two are extremely important for the phone and work especially well for iOS games which don’t rely too heavily on the operating specific UI elements. Combined with the bridges for ‘classic windows’ apps and websites using Microsoft Edge, the Store should get a lot more apps on this Windows 10 wave of releases.

From a user’s view, Windows 10 has really rounded out, with the latest Insider Preview feeling a lot more polished than any of the previous builds. Seeing HoloLens run standard Windows Universal apps was a big deal too.

I’ll have more thoughts on these in the future as the Insider Preview continues, and more information for HoloLoens is released at E3.

Microsoft <3 Docker and other Azure improvements

Azure, and the Microsoft Cloud in general, continue to amaze me. Microsoft has managed to embrace this new way of building (and selling) software in at breakneck speed. Additional services were added throughout the platform all the way from storage and networking, to analytics and machine learning. Way too many for this article.

Two of the biggest highlights were the ability to run the complete Azure Stack locally, and Azure’s new Data Lake features too, something which Amazon has had a lot of success with.

Microsoft <3 Docker

For me though, the most interesting changes were around Docker support across Windows and Azure. Docker has been on my radar for a while, but I have yet to use it in production. I have plans to do so in the not too distant future.