Scott Hanselman

Setting up Windows 10 for IoT on your Raspberry Pi 2

May 5, '15 Comments [70] Posted in
Sponsored By
Windows 10 IoT on small embedded devices

Windows 10 Raspberry Pi robotThis week at the BUILD conference in San Francisco Microsoft released the first preview of Windows 10 IoT (Internet of Things) for Raspberry Pi 2 (as well as other lovely devices like the Intel Galileo and MinnowBoard Max).

First, as I mentioned in February the Raspberry Pi 2 runs the Windows 10 IoT version. That means there is no "shell" or Windows Explorer. It's not a tiny desktop PC, but rather the core brain of whatever embedded maker thing you choose to build with it. The core of it is Windows. You've got PowerShell, you can run Windows Universal Apps that you write in C#, and you can talk to peripherals.

Over here at there is a great list of projects you can build with Windows IoT, including a cool robot you can control with an Xbox Controller.

Installing Windows 10 on your Raspberry Pi 2

This is an early build so things will change and get easier I'm sure. To be frank, getting the builds for Raspberry Pi took some confusing on my part to download.

  • Go to the Windows Embedded Connect site and sign in.
  • Pick the Build you want. I got Windows 10 IoT Core Insider Preview Image for Raspberry Pi 2.
  • You'll need to install this older "File Transfer Manager" if you don't have it. If you have Chrome, you'll need to click the ".dlm" file and open it with the File Transfer Manager. You'll also need to accept two EULAs.
  • Then you'll get a large ZIP file with the image you want inside. Unzip somewhere.
  • Here's a kicker, you'll need a Windows 10 Preview machine to run these commands and install.
    • I built one with a laptop I had around. I'm not sure why Windows 10 is needed. However, once it's setup you can use Windows 8.1 to talk to the Pi 2 or Remote PowerShell in.
  • You should also get Microsoft Visual Studio 2015 RC.
    • After you install 2015, go try to make a Universal App and it will download the Universal Apps SDK.
  • Follow the instructions here.  Below is my summary along with the gotchas that slowed me down.

Now, plug your micro SD card into your Windows 10 PC (I use a micro to USB adapter) and open an Administrator PowerShell and run:

  • wmic diskdrive list brief and make note of the physical disk number of your SD Card.

next run this and change PhysicalDriveN to whatever your SD Card's physical number is.

dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDriveN /SkipPlatformCheck

  • NOTE: I had some issues and got "Error 50" on one of my micro SD cards. Changing cards worked. Not sure what's up.

Now, just put your micro SD card into your Pi 2 and boot up your Pi 2 while connected to a display and Ethernet. It will initially startup very slow. It could be 2 to 4 minutes before you get to the main screen. Just hang in there until you see this screen. This is the Default app and just shows the IP Address of your Raspberry Pi 2.

Installing Windows 10 on a Raspberry Pi 2 

Now, from your local admin PowerShell run these commands to remote into your Pi 2. The default name is MINWINPC but you can also use the IP Address.

net start WinRM
Set-Item WSMan:\localhost\Client\TrustedHosts -Value MINWINPC
remove-module psreadline -force
Enter-PsSession -ComputerName MINWINPC -Credential MINWINPC\Administrator

When the credentials dialog opens, make sure you use yourrpi2machinename\Administrator or yourrpi2ipaddress\Administrator for the user name. I was just using Administrator. The default password is p@ssw0rd and you should change it.

See here how the PowerShell prompt changes to include the remote machine's name after I've remoted in?

remoting into Windows 10 on a Raspberry Pi 2

On your Windows machine install the MSI that was included in the download. It will start a small watcher utility that will scan your network and look for Microsoft IoT devices. It's easy to lose them if their IP address changes. It also has a nice right click menu for getting to its embedded web server.

Windows IoT Core Watcher

Included and running on the image is a web server that will let you explore attached devices and running processes.

Raspberry Pi 2 Windows 10 Web Management

You can also deploy applications from here although you'll usually do it from Visual Studio.

Raspberry Pi 2 Windows 10 Web Management

As of the time of this blog post they didn't have WiFi and Bluetooth ready yet but they are updating it often so I am sure we'll see updates soon. Here is a list of devices that work today via USB.

There's lots of samples. You can make Background (headless) IoT apps or do ones with a UI since the Raspberry Pi has HDMI built in.

Finally, here's turning on an LED from C# (with comments and defensive code).

using Windows.Devices.Gpio;

private void InitGPIO()
var gpio = GpioController.GetDefault();

// Show an error if there is no GPIO controller
if (gpio == null)
pin = null;
GpioStatus.Text = "There is no GPIO controller on this device.";

pin = gpio.OpenPin(LED_PIN);

// Show an error if the pin wasn't initialized properly
if (pin == null)
GpioStatus.Text = "There were problems initializing the GPIO pin.";


GpioStatus.Text = "GPIO pin initialized correctly.";

Deploying from Visual Studio

Make sure the remote debugger is running with schtasks /run /tn StartMsVsmon and connect with no authentication while it's running.


Now you can deploy a Universal App (with UI!) directly from Visual Studio:


And here is my amazing app. Which is basically just a bunch of controls I threw onto the XAML. But still. Fancy!

My XAML app running on my Raspberry Pi 2 with Windows 10

Windows Remote Arduino and Virtual Arduino Shields

A few other cool maker things worth pointing out are Windows Remote Arduino and Virtual Arduino Shields. Remote Arduino lets you talk to your Arduino from your Windows  machine using the Firmata protocol. Then you can reach out to an Arduino device and give it commands from a Windows Universal app. The Virtual Arduino Shields lets you use a Windows Phone as a well, just that, virtual shields. Shields for Arduino can add up and when you're prototyping you may not want to shell out for a Gyro or GPS. A cheap phone like a Lumia 530 has like $200 worth of sensors (gps, touch display, gyro, internet, speech, etc) in it that you can exploit.

It's early days but I'm pretty stoked about all the options that Makers have available. The ASP.NET team is in talks with the IoT folks to see if we can get ASP.NET 5 running on Windows IoT on a Raspberry Pi as well, so stay tuned. Get started here.

Related Links

Sponsor: Big thanks to the folks over at Grape City for sponsoring the feed this week. GrapeCity provides amazing development tools to enhance and extend application functionality. Whether it is .NET, HTML5/JavaScript, Reporting or Spreadsheets, they’ve got you covered. Download your free trial of ComponentOne Studio, ActiveReports, Spread and Wijmo.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Tuesday, 05 May 2015 02:44:58 UTC
ASP.NET 5 on this would be amazing! Is there anywhere we can watch to keep up?
Tuesday, 05 May 2015 03:16:53 UTC
I am a bit confused. You stated that Windows IoT has no shell. And yet you were able to deploy an app that has a UI. Am I missing something simple?
Tuesday, 05 May 2015 03:25:01 UTC
RobertG - you can run one app at a time full screen. There is no "Windows Shell." No explorer, no file management visually, no Start Menu. That's the "shell."
Scott Hanselman
Tuesday, 05 May 2015 03:33:02 UTC
@Scott - This is great. Makes it perfect for Kiosk type applications.
Tuesday, 05 May 2015 03:37:58 UTC
Intel Galileo was one of the first ones to get a version of Windows (not Win10 IoT core though).
Is it fair to assume that a version of Win10 IoT core will be available soon to run on 32-bit processor on Intel Galileo?
Tuesday, 05 May 2015 04:40:35 UTC
Will this work with VS community edition?
Onur G
Tuesday, 05 May 2015 04:41:17 UTC
Good blog post, Scott. I'm glad they have support for the Fermata protocol. I anticipate a simpler install.
Tuesday, 05 May 2015 05:09:11 UTC
Hey Scott,

Can I use Visual Studio 2015 RC on a Windows 8.1 machine to develop & deploy apps to the Raspberry Pi? I ask because I've been able to successfully build apps on Windows 10, but when I try and add the Windows IoT library to projects on Visual Studio 2015 RC on Windows 8.1, I get a targeting error

"Could not install package 'Windows.IoT 1.0.0-alpha-4'. You are trying to install this package into a project that targets 'Windows, Version=v8.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."

The odd thing is that if I load the sample code (Blinky, for example), they execute and deploy and work just fine. I just don't seem to be able to create a new blank project on Windows 8.1

I'm probably missing something simple..
Aditya Nag
Tuesday, 05 May 2015 05:13:51 UTC
It was simple. I was trying to load the wrong package. I just need the Windows IoT SDK!

Heh, sometimes, all you need to do is ask for help and inspiration strikes in a blinding flash.

Thanks anyway!
Aditya Nag
Tuesday, 05 May 2015 06:50:16 UTC
Hey Scott,

you don't have to use the Download Manager. There's a direct download link on the right!

I'm also a bit disappointed to see only a very rudimentary "webserver" in the sample repos and no

Louis Haußknecht
Tuesday, 05 May 2015 10:10:42 UTC
You'll need to install this older "File Transfer Manager" if you don't have it. If you have Chrome, you'll need to click the ".dlm" file and open it with the File Transfer Manager. You'll also need to accept two EULAs.

You only need the FTM if you click the '[Download] selected file(s) using FTM' button, if you look to the right of the file in question, there's a 'Download single file' download link, which will download the zip file directly.
Tuesday, 05 May 2015 11:38:48 UTC
Is this the new way Microsoft is using to push PowerShell use?

You should know better, Scott!

Why are you instructing your readers to open a PowerShell console to run no PowerShell code/script. It's loading the .NET runtime for nothing but burning cycles and making the user wait.

If you really want the user to use PowerShell and WMI, at least, give the PowerShell way of doing it:

Get-CimInstance -ClassName Win32_DiskDrive

Tuesday, 05 May 2015 12:00:26 UTC
Hmm... The Windows Embedded Connect Site doesn't list any downloads for me. And, I am unable to find a way to "join the program" or anything. Any ideas on how I can get the download??
Tuesday, 05 May 2015 12:29:08 UTC
This is cool and it dovetails nicely into my wanting to buy a Raspberry PI 2
Tuesday, 05 May 2015 12:46:27 UTC
Apparently I need to "sign" the EULA first...
Tuesday, 05 May 2015 13:33:22 UTC
In your C# code, I think you forgot to declare pin as a variable. Looks very cool though, I just got my Raspberry Pi 2 this weekend and am looking forward to start tinkering with it!
Scott Simontis
Tuesday, 05 May 2015 14:46:19 UTC
For reference, the onboard, green status-led has pin 47 :)
Tuesday, 05 May 2015 16:02:55 UTC
If you want to do this all from a Windows 10 VM rather than a physical machine, you can by sharing raw access to the SD card:
Ben Emmett
Tuesday, 05 May 2015 18:11:38 UTC
I'm not sure why Windows 10 is needed

You only need Windows 10 because of the dism.exe which is available on Windows 10 only. ;)
(BTW: The dism.exe seems to be included in the "Windows SDK for Windows 10". That means, it should also be possible on Windows 8.1. I'll try it soon.)
Tuesday, 05 May 2015 19:33:58 UTC

Can you share your project code for the UI to get us started?

Peter Jones
Tuesday, 05 May 2015 20:00:53 UTC
Peter Jones - There is plenty of sample code as well as tutorials at the Microsoft IoT site on GitHub:
Lars Pedersen
Tuesday, 05 May 2015 20:22:16 UTC
Very nice. Thanks for this. I have no interest at the moment, but I will definitely keep this in the back of my mind.
Tuesday, 05 May 2015 22:01:09 UTC
What "version" of C# is supported here? I see you can do WPF, does that mean it can run directx and is hardware accelerated?
Mladen Mihajlovic
Tuesday, 05 May 2015 22:10:45 UTC
Mladen: That's not WPF, it's the don't-call-it-Metro, don't-call-it-Modern-either "Universal" apps with XAML - the stuff that was introduced in Windows 8 and has been revved since.
Wednesday, 06 May 2015 00:50:53 UTC
I spy a Netduino 3
Adam Dzak
Wednesday, 06 May 2015 01:20:38 UTC
Thanks Scott :)

I am new in IOT scene and was surprised how easy was it to install Windows 10 on Pie 2 and even deploy your own apps from Visual studio. However I still hasn't managed to get my mouse or keyboard or working.

I tried wired and usb wireless mouse (with batteries - just it case power was the issue).I am powering pie using a Nokia 1020 phone micro usb charger from an actual power source.

Am I missing anything ?
Wednesday, 06 May 2015 01:27:05 UTC
The MSI does not work on VS express?
Wednesday, 06 May 2015 02:28:11 UTC
It would be helpful if you could push some of this back to the documentation that is published. I found it useful, but I only found your information after I set it up.
Wednesday, 06 May 2015 05:32:20 UTC
The GPIO APIs are really simple and straightforward. :)

Here is another simple example:
Wednesday, 06 May 2015 05:34:17 UTC
The idea that Windows 10 would run on raspberry pi is a nice one. But Microsoft make it hard to setup one by requiring you to have a running (usually a spare) PC with Windows 10 preview. I hope they make up their minds and make this setup possible using your existing Windows PC. In my situation, I don't have another PC where I can install Windows 10.
Stephen Job
Wednesday, 06 May 2015 09:12:04 UTC
Scott, did a normal USB mouse worked for you? I can see a mouse pointer sometimes but when I move the mouse only some flickers occur...
Pedro Conde
Wednesday, 06 May 2015 09:27:59 UTC
Stephen Job,
you can install Windows 10 as a second operating system as I did. I have Windows 8.1 also Windows 10 with dual boot. As a guidance example, please refer to this url :
Pedro Conde
Wednesday, 06 May 2015 14:08:38 UTC
After a couple of troubles with a Windows 10 Preview VM I downloaded the Windows Assessment and Deployment Kit (ADK tools) for Windows 10 Preview on my Windows 7 machine and installed just the DISM Part.

Now I could run the DISM command on Windows 7. No need for Windows 10.
Wednesday, 06 May 2015 19:21:25 UTC
What's with the Miracast app showing app on the screenshot?
Wednesday, 06 May 2015 20:08:37 UTC
For anyone needing/wanting to set up Windows 10 IoT on their Raspberry Pi 2 but does NOT want to have Windows 10 on their physical PC, here are instructions to install it from a Windows 7 (probably 8/8.1/etc also) machine:

Install Windows 10 for IoT using Windows 7

I only have Windows 10 on a VM and used this method successfully to install on my Pi 2. Note the second post tells you exactly the files you need to copy if you would rather not grab the whole sources folder.
Thursday, 07 May 2015 03:59:22 UTC
watcher doesn't work

Faulting application name: WindowsIoTCoreWatcher.exe, version: 10.0.10103.0, time stamp: 0x553591f8
Faulting module name: KERNELBASE.dll, version: 10.0.10074.0, time stamp: 0x553acf7b
Exception code: 0xe0434352
Fault offset: 0x00000000000218f8
Faulting process ID: 0x14e0
Faulting application start time: 0x01d0886303c5649d
Faulting application path: C:\Program Files (x86)\Microsoft IoT\WindowsIoTCoreWatcher.exe
Faulting module path: C:\WINDOWS\system32\KERNELBASE.dll
Report ID: b393ea71-ee50-46db-bc99-0dceaae2e34a
Faulting package full name:
Faulting package-relative application ID:
Thursday, 07 May 2015 05:23:14 UTC
I was able to successfully image the Pi2 per Max' instructions from Win 8.1 and without any Win10 VM. I did have to use a second SD card, the first one never seemed to boot up. No error was reported. Note that for me, on bootup I see the Windows logo and an odd spinner logo for about 10 seconds before a couple minutes of nothing, followed by a colorful looking version of fontawesome document icon, lol, finally followed by the screen you see in Hanselman's post.

Now one thing that sucks, is that there doesn't appear to be any support for wifi dongles, at least not mine, so you end up tethered.

There is a Network & Wi-Fi section in the settings of the default IOT app, so if anyone gets a wifi dongle working, please let us know. Thanks in advance.
Thursday, 07 May 2015 14:53:34 UTC
I don't appear to be able to have the Gpio namespace in my project. Any idea what I might be missing that would cause this?
Thursday, 07 May 2015 15:14:21 UTC
And like all people tinkering, I think I got to the heart of what's happening. If you're not able to access the Windows.Devices.Gpio namespace, make sure this is in your csproj:
Thursday, 07 May 2015 17:55:43 UTC
Just a small typo at: schtasks /run /th StartMsVsmon

I believe it should be schtasks /run /tn StartMsVsmon

Many thanks for the great post!
Nguyen Quy Hy
Thursday, 07 May 2015 18:10:50 UTC
If your watcher utility does not work:
Thursday, 07 May 2015 21:18:58 UTC
I have tried the win 7 instructions and get Error 87 The /applydrive option is not recognized in this context (which is supposed to mean I'm not using the right dism but it says Version: 10.0.9926.0. I've also tried mounting my SD card on virtual box VM running Win 10 preview but no luck on both counts.
Edward Evans
Saturday, 09 May 2015 01:14:13 UTC
I'm not a developer, however, am a dabbler, but wanted to know more about the capabilities of this. I have a win32 dll file with another project that a contractor made for us. Could I create a c package to call functions from the dll file or does it have to be a single compiled file on this?
Sunday, 10 May 2015 19:58:39 UTC

Has support for the serial port been added?

Monday, 11 May 2015 01:41:10 UTC
in the schtasks did you mean to use /th not /tn?
Robert Hogg
Monday, 11 May 2015 17:59:48 UTC

first of all thx for bringing W10 to IOT!
I started installing all the stuff and tried to get my first project done on R-PI 2.
Now i have 2 problems:
1. I'm not able to open the Python examples (PTVS 2.2 RC VS2015 installed), CPython.targets was not found
2. I'm trying to talk to DHT22 Sensor (C#, Universal App). It is connected via MaxDetect-1-wire bus. I connected it to GPIO but now I'm not able to get the right timings. Is there a way to get into a kind of real time mode or have sth. like a clock? The minimum delay that i have to get is ~10us.

Any ideas? THX
Tuesday, 12 May 2015 22:37:37 UTC
Hey Thomas,
I have been using Windows IoT with a BMP180 and DHT22 sensor, however to get the timing for the DHT22 sensor I have used an MSP430 to act as an I2C -> DHT22 bridge. I couldn't get the timing with just the Raspberry Pi in Windows, I know it's possible in Linux though. You could use an Arduino, a plain AVR, PIC, whatever, I2C (and I assume SPI) are super easy in Windows IoT so I'd recommend them if possible. Probably not the answer you wanted.

Wednesday, 13 May 2015 17:30:52 UTC
Hey Ben,

this isn't the answer that I wanted to get ;-) Briding with other hardware is not an option for me at the moment (for me it's more about getting things done in a nice way than getting things done in fast ). If it's possible on Linux it should also be possible on Windows 10. Maybe it's an option to create a driver or write some other stuff that runs outside the universal app and gives back the data. If I find a solution I'll share it. And probably in some weeks I'll buy some more hardware to create a bridge ;-)
Thursday, 14 May 2015 15:01:34 UTC
This is very exciting :) Glad that MS is doing this.

Could you do some examples with headless apps and sockets / tcp or a WebService.
Saturday, 16 May 2015 11:18:51 UTC
I was able to use a logitech k400 wireless keyboard/trackpad on the pi. I don't see that listed as a compatible device for w10-iot, but it works perfectly.
Sunday, 17 May 2015 03:43:39 UTC
Hey All
I had a similar error then I found this blog which got me up and running:
regards JR
Saturday, 23 May 2015 17:54:29 UTC
"The ASP.NET team is in talks with the IoT folks to see if we can get ASP.NET 5 running on Windows IoT on a Raspberry Pi as well"

Can you elaborate as to why this doesn't work now? I've had some success running a self-hosted OWIN app on a rasp pi b+ using mono and had thought that it would be a similar (and easier) job to run the same on Windows 10 IoT.


Sunday, 31 May 2015 18:35:55 UTC
Its very frustrating that wifi isn't a core part of Windows 10. This reminds me of the way Windows Phone 7 was released without a bluetooth SDK and with very limited and a very buggy web stack. You couldn't do streams and the webclient would cache get responses.
There never was a bluetooth SDK for Windows Phone 7. You had to wait until Windows Phone 8 for that. So if you bought a Windows Phone 7 device you were out of luck if your goal was to develop device integrations.
the the
Sunday, 31 May 2015 21:07:10 UTC
error 87
Thursday, 04 June 2015 17:47:41 UTC
Has anyone managed to set portrait mode with Win 10 IoT and the Raspberry PI 2?
I ahve tried to alter /config.txt to:

With these settings, Win 10 IoT will not boot at all.
Ken Mamelund
Saturday, 06 June 2015 16:57:18 UTC
Anybody tried connecting to the Raspberry Pi to a wireless network adapter such as Wi-Pi? Is it supported for the Windows build? Or a wired Ethernet connection is a must?

Saturday, 06 June 2015 23:28:39 UTC
Good blog... spelling mistake: schtasks /run /th StartMsVsmon should be schtasks /run /tn StartMsVsmon
Saturday, 13 June 2015 05:38:34 UTC
I am trying to connect my hp wireless mouse to Raspberry pi 2b installed with Windows 10 IOT core but its not getting connect.

Would you please suggest me how could I go ahead with the same
Thursday, 18 June 2015 10:43:28 UTC
I managed to connect my wireless mouse and it worked immediately (this usually means that something is wrong). I used a Logitech M185 .. However I have no luck when testing the wireless network using TP link. Anyone solved that one yet?
Lars Ahlfors
Sunday, 21 June 2015 00:01:57 UTC
Any idea how well these are working managed by Group Policy (if possible) and what subset they've got? I believe I've just worked out how to save a client a few hundred thousand a year on their next IT renewal with a reasonably simple migration of code but only if these can be managed on scale (several hundred at least) within an organisation replacing workstations that only need to run single-purpose applications.

The other question I'm curious on if anybody has any experience, is driver support. Will any future Win 10 drivers inherently have to be cross-architecture or is this solely down to manufacturer support much in the same was as the very slow move to x64 support?
Guy Powell
Sunday, 21 June 2015 02:27:37 UTC
Hi Scott,

There is a type in the command to start up the vsmon: has /th but it should be /tn!

Cheers for the article :)

Sunday, 05 July 2015 16:25:04 UTC
Hey Scott,

Typo on the command line to start the remote debugger:
schtasks /run /th StartMsVsmon

it should read:
schtasks /run /tn StartMsVsmon

Wednesday, 08 July 2015 01:40:35 UTC
Anything I can do if the Web server is not available ?
I can ping the IP address, SSH and powershell to it but I do not have the web interface shown (I downloaded the image today).
Wednesday, 08 July 2015 01:56:06 UTC
Ah, got it.
Anyone having the same issue, the web server has been moved to port 8080 in the most recent builds. I was to eager to get started that I skipped the what's new of the build doc.

Thank you for the many useful articles on here.
Tuesday, 14 July 2015 07:29:41 UTC
thanks for the comment on SD cards, got 50% the way through, could remote in but nothing else. New flash card, all the way through. perfect.

do you know if there is a hardware compat list somewhere ? or a recommended USB Wifi ? I have a USB Wifi that came with my board but seems to be ignored.
Tuesday, 14 July 2015 20:37:59 UTC
Now that I've got Pi, I can start hacking! Since this is a Raspberry Pi 2, it can run the new Windows 10 for IoT making it easy to build apps for it with C# and Visual Studio.
Wednesday, 15 July 2015 16:07:47 UTC
WIFI SUPPORT?????????????
Thursday, 16 July 2015 17:27:14 UTC
@Eric: You'll need to buy a cheap USB Wifi stick. I preferred a nano one : EDUP EP-N8508GS and it does the job.
Faruk Celik
Saturday, 25 July 2015 18:33:49 UTC
I'm working on cool extension for Pi2 devices. Take a look here
Friday, 31 July 2015 20:34:34 UTC
What is the case your using for your PI?
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.