Restore the Microsoft PowerShell plugin to its default configuration

Every once in a while I mess up my Windows installation… you know, things stop working and stuff giving errors all over the place.
Due to some projects I’m working on the last few months the Microsoft.PowerShell plugin gets corrupted corrupted frequently (don’t ask my what I’m doing to accomplish that 😉 ).
Specifically, when trying to open a remote session, or simply when I do a “Invoke-Command” to the localhost, an error is given stating that it cannot find the Microsoft.PowerShell session configuration in WSMAN.

So, how can you quickly fix that and more importantly, howto do it the easy way.

This will restore the default plugin configuration… and yes, you’ll need an internet connection for this to work 😉

Note: I’m assuming here that you’ve checked if WinRM is configured properly. The solution in this post is a last resort and should not be applied when other options (like Enable-PSRemoting -Force) are available.

Big fat note: All external plugins will be unregistered by this command!


  1. Why do you need an internet connection for this to work?

  2. Jeff Wouters says:

    ‘Cause it gave me an error when I hadn’t 😉 And by the looks of the command it will connect to the Microsoft website for the information it needs…

  3. Vincent Deneve says:

    Thanks. I got it resolved with enable-psremoting on 2 servers.

    Better make that big fat note red though, to make it idiot-proof. Almost missed it 🙂

    BTW Do you know of a command to list all listeners, or list all ‘external plugins’ that you mentioned ? Whenever I need to do something with listeners I’m paranoid about breaking stuff.

  4. Jeff Wouters says:

    Hi Vincent,
    I’ve made the node red, thanks for mentioning.
    Don’t know of a command to list the external plugins / listeners but since WSMAN is used, you can search for the WS Management Catalog (a bunch of meta data) on the internet. It contains most of the information you would be looking for.

Leave a Reply

Your email address will not be published. Required fields are marked *