If like me you have a several Raspberry Pi’s doing different things and running different operating systems controlling them can sometimes be a bit of a challenge, especially with a wealth of remote control protocols and command line tools to choose from. In this post I’m specifically exploring the different ways to control your Raspberry Pi running Windows 10 IoT Core.
The thing that surprised me about Microsoft’s “core” flavour of operating systems is just how much they appear on the network like a normal workstation, this might sound silly and very obvious but for the longest time when installing servers in Hyper-V I would shy away from the minimalist core install because I very wrongly assumed this meant you only got a black CMD prompt and nothing more. With Windows 10 IoT Core I can assure you that this is certainly not the case. Apart from the lack of a pretty title Start Menu the operating system (OS) is feature rich and very easy to work with.
Lets look at what we can use to control our Pi and Core OS.
The Old Fashioned Physical Method
Just for completeness its probably best to start with the traditional approach of using physical things like a HDMI cable plugged into the back of your monitor plus a keyboard and mouse connected via USB ports. This is obviously very basic and probably not why you’ve been drawn to this blog post. However even via this method you do get a graphical interface on screen with the ability to alter things like the WiFi settings and actually shutdown the device correctly without pulling the plug.
Windows Core Browser Console
Next and by far my favourite feature in Windows 10 IoT Core is the browser based console that can be connected to using the IP address of the device followed by port 8080. Eg: HTTP://192.168.1.2:8080.
If you navigate to the equivalent address of the device on your network you will be prompted for a set of admin credentials and then taken to a lovely bunch of pages which include a wealth of configuration options. When developing this satisfies almost all of my immediate needs for controlling the device and starting up deployed applications.
The browser console even includes a Task Manager style page of running processes with some pretty real time performance graphs for CPU, RAM, I/O and Network usage. See slide 5 of 16 in the GIF above.
Lets move on before I turn this blog post into a page of screen shots!
Windows IoT Remote Client
Next we have the IoT Remote Client app, which as I type is officially still in preview. However this is another really helpful way to control your device. The desktop application available from the Microsoft Store is basically the IoT Core operating system RDP client, so no need for VNC server licencing between Raspbian and Windows to worry about.
Store link: https://www.microsoft.com/en-gb/store/apps/windows-iot-remote-client/9nblggh5mnxz
To get this running in the browser based console I mentioned above first go to the Remote page and tick the box to Enable Windows IoT Remote Server. AKA Terminal Services. Next install the app on and start it up. If all is well it will detect the IoT device on your network and allow you to connect, or just enter the IP address in the box provided. Post authentication you’ll then have a view of your IoT device matching exactly what the HDMI cable can offer. Plus the ability to interact with the device with a keyboard and mouse through the remote session. When starting apps that include something graphical it’s really useful to see the thing. Another use case might be when performing cloud to device messaging, having the received content on screen is nice to see.
This method of remote control is where I actually pulled the first screen shot above from, rather than taking a picture of the monitor displaying the HDMI output.
IoT Dashboard
Another really useful bit of software in the IoT device toolbox is the IoT Dashboard.
Download link: http://go.microsoft.com/fwlink/?LinkID=708576
This walks you through the setting up a new device SD card plus gives you a My Devices window for easily launching the next 2x features detailed below.
PowerShell
What can’t you do with PowerShell in the Microsoft world?
Before the IoT Dashboard connecting to the IoT Core device required starting the PowerShell remote commands service. Then setting the items address etc etc. Like this:
$MyDeviceIP = "192.168.1.2" #Example
Net start WinRM
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $MyDeviceIP
Enter-PSSession -ComputerName $MyDeviceIP -Credential "localhost\Administrator"
Now if using the IoT Dashboard above from My Devices you have the option just to right click on the auto detected device and select Connect using PowerShell. This handles all the above prerequisites for connecting and only prompts for credentials. Lovely!
Note; both PowerShell methods of connection to the device will require elevated permissions.
Admin File Share
Lastly and again really for completeness we have the traditional UNC path. From the IoT Dashboard this is made easily in My Devices this time by selecting Open Network Share. This brings up a file explorer window to the C$ admin share for browsing the file system on the SD Card.
For anybody that is used to seeing the contents of the C drive on a Windows this folder structure will look very familiar. Program File etc.
Other
Sadly despite a few attempts things like Remote Registry access, remote connection to Services using your local snap-in console and Computer Management are not currently supported. The Service to enable Remote Registry simply isn’t there, along with other remote management services on Windows 10 IoT Core. If this changes I’ll be sure to update this post.
Many thanks for reading.
Hi, you mentioned that the registry key to enable Remote Administration simply isn’t there on Window 10 IoT Core. Do you know which is the registry key and value for Remote Administrator on the Windows for desktop?
Hi Mel, thank you for your comment. I believe the sentence in my post your referring to is unclear. Please accept my apologies for this. It should read; the service to enable remote registry administration isn’t there. I’ll make an amendment now! Kind regards Paul
Hi Paul,
Thanks for the write-up — it’s so nice to see such a clear explanation all in one place!
You describe how to view the file system on the SD card from a desktop machine, but would you happen to know how to view the files/folder on a usb drive attached to the R-pi? I’d like to be able to transfer files from my desktop machine to a usb drive attached to my R-pi, but I can’t seem to figure-out how to access it (e.g., mount it) to transfer files.
Any help would be greatly appreciated!
Thanks,
Rich
Hi Rich
Thanks for your comment and feedback. Great question too.
The easiest way I’ve found to do this is using PowerShell. From the IoT Dashboard if you open a PowerShell session to your Pi running WinIoT. Then insert the USB memory stick. Next, use the PowerShell command
gdr -PSProvider 'FileSystem'
. This will return a list of all drives available on the device of which your USB stick should be one of them. Note; drives C, D and U are used by the device and OS. Then you can do things likeCD E:\
and use other good old fashioned command line operations like COPY, DIR etc.The other less easy option would be to create a UWP app to give you a file explorer style GUI. I might look into this more and turn it into another blog post! Thanks for the idea 🙂
Cheers
Paul
Hi Richard
Just to follow up. I eventually decided this was a good bit of knowledge to stick on Stack Overflow. Here’s a link to the question and answer: http://stackoverflow.com/questions/39349209/transfer-files-from-a-usb-stick-to-windows-10-iot-core-local-storage
Thanks
Hi Paul,
Thanks for the response! It’s been quite useful.
If I could indulge your patience for one more moment, I have a related question that has arisen because the FileOpenPicker is not implemented for the pi. I have a uwp program running on my pi that needs to receive some data from a desktop program on the same network. Ideally, both programs would be able to access a common folder on the pi, and the desktop app would write the data there and the pi app would then read it. Without the FileOpenPicker, the only folders the pi app has permission to see are the install folder (whose path changes for each app) and the “KnownFolders.” I’d like to be able to use one of the known folders, but as with my question above, I can’t seem to access the any of the known folders programmatically from the desktop program. I’ve been able to use the the powershell command to transfer the file manually, but this is not practical in the long-run. Do you know of a method that can be used in code from a desktop app (uwp) to save a file to one of the KnownFolders on a pi? If this is not possible, how do people solve the problem of getting data files from a desktop app into a program running on a pi?
Thanks again for the work you put into your blog! I just finished reading through all the posts yesterday.
Rich
Great article. Thank you for posting!
Do you know if event logging can be enabled on a Raspberry Pi with Windows 10 IoT Core?
I’m interested in logging events such as failed or successful login attempts, etc.
Thanks in advance.
Alex