Tech Off Thread

5 posts

Powershell Commands in winRT

Back to Forum: Tech Off
  • User profile image
    Rahtol

    Hi,

    I am currently working on a winRT app that needs to run some Powershell commands but I can't seem to find a way to do it.

    I'm searching the equivalent of this:

    Runspace runspace = RunspaceFactory.CreateRunspace();

     

    Thanks in advance

  • User profile image
    Sven Groot

    I sincerely doubt if WinRT apps (which are sandboxed) can instantiate or launch PowerShell.

  • User profile image
    jonoble

    There's probably a really round-about way that you could do it by having a server setup as a Management OData endpoint so you could call the PowerShell using a web service. You might even be able to tell that server to remote back in to the calling client to run something locally, but it's horrible and probably not worth the trouble.

  • User profile image
    Rahtol

    Thanks for the help.

    As you said, it's horrible and not worth the trouble. I think the only option is making a second program (WPF) and leave the metro UI to implement that piece of functionality.

  • User profile image
    evildictait​or

    Powershell is disabled for Windows RT.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.