It is quite amazing to see how much power is hidden inside the Windows RT operating system if you just go looking for it. Where the iPad iOS is basically a phone with a large screen, the Windows Surface and its brethren have so more to offer as a scaled down PC. You may never want this or need it, but if you do, it’s there.
More useful is the fact that Powershell is supported. But when you try to run a script file, the classic Powershell message that comes up:
File C:\users\peh\documents\test.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
On an ordinary PC you would then usually use the command Set-ExecutionPolicy RemoteSigned
If you do this on Windows RT, however, it will throw this message at you:
Set-ExecutionPolicy : Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied.
It took me a while to google an answer to this, but what helped me was this great post by Jeroen W. Pluimers.
The answer from Jeroen is to use a variation of the Set-ExecutionPolicy that only covers the current user – remember that, as opposed to iOS, the WinRT OS has the concept of user-based security:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned