Windows RT

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Forums Archives Forums Archives 5 years, 6 months ago.

  • Author
    Posts
  • #5269

    by dsf3g at 2012-11-12 05:56:24

    Anyone had a chance to play with Powershell on a Windows RT machine? I was tickled to see that RT includes Powershell when I was playing with an RT device at Best Buy. But I didn't really get a chance to put it through its paces. I'm curious about its capabilities, and usefulness.

    by MattG at 2012-11-12 06:56:47

    I've been playing with it since I got my Surface on the release date. I was very surprised and excited when I saw that it had PowerShell on it. After I started playing it though, I quickly realized its severe limitations. In my view, it's primary limitations stem from increased security and can be summarized as follows:
    1) The LanguageMode of the default runspace ($host.Runspace.LanguageMode) is ConstrainedLanguage meaning that access to the vast majority of .NET (including several cmdlets) is restricted
    2) You cannot compile or load code that is not signed by Microsoft. What's this mean? No Add-Type and no loading of non-Microsoft binary modules (Pscx immediately comes to mind)

    Ultimately, many of your scripts will need to be rewritten to rely less on .NET and rely more heavily upon cmdlets and built-in PowerShell language features.

    For reference here are some of the things I found while attempting to bypass the security restrictions of PowerShell on Windows RT:

    * I compiled an unsigned and a self-signed PowerShell binary module in the hopes that PowerShell might have forgotten to check signatures upon importing a module. I was stopped dead in my tracks.
    * I used PowerShell and VBS scripts to interface with COM objects. Got smacked down in both environments.
    * I tried modifying the default PowerShell PSSessionConfiguration (this controls the default language mode) using Register-PSSessionConfiguration in an attempt to change the default lanaguage mode to FullLanguage. Didn't work.

    Aside from the security-related findings, some general things I find annoying with PowerShell on Window RT are:
    1) No ISE
    2) No tab-completion for custom functions

    That's all that comes to mind for now. Hopefully I haven't dissuaded anyone from buying a Surface though. Limitations of PowerShell aside, I think it's a great device. Plus, the PS limitations are actually forcing me to work more with the built-in PowerShell language features and serving to ween me off heavy .NET reliance.

    by dsf3g at 2012-11-12 07:04:33

    Thanks for the in-depth review!

You must be logged in to reply to this topic.