Skip to content

WinRM Plugin Registration and Modification #1193

Closed

Description

Overview

On Windows, the PowerShell installer will not automatically enable receiving incoming requests. The feature shall be activated as a post-install step that requires Administrator-level authorization (due to the WinRM plugin's System32 placement requirement).

Changes Required

Enable-PSRemoting Changes

Cmdlet implementation should be changed to also

  1. Copy pwrshplugin.dll from %ProgramFiles%\PowerShell\ (aka $PSHOME) to %windir%\System32\PowerShell
  2. Create a the necessary plugin configuration file in %windir%\System32\PowerShell
  3. Register the plugin as a WinRM endpoint (Proposed name = PowerShell.)

Get-PSSessionConfiguration should work with these changes.

Activity

  1. modified the milestones: Future, on Jul 13, 2016
  2. alexandair commented on Jul 20, 2016

    @alexandair
    Contributor

    How is Get-PSRemoting different than Get-PSSessionConfiguration?

    UPDATE: Is this expected?
    PS C:> Get-PSSessionConfiguration
    Get-ChildItem : Cannot find drive. A drive with the name 'WSMan' does not exist.

  3. HemantMahawar commented on Jul 20, 2016

    @HemantMahawar
    Contributor

    Aleksandar Nikolić (@alexandair) ... that was left over from previous thinking. Cleaned it up .. cc Mike Richmond (@mirichmo)

  4. mirichmo commented on Aug 7, 2016

    @mirichmo
    MemberAuthor

    Due to time constraints for the upcoming release, I implemented a partial solution to this issue. The script Install-PowerShellRemoting.ps1 resides in $PSHOME for Windows releases and will automatically register the included plugin as a WinRM endpoint for PS remoting. The script must be run with Administrator rights because it copies the plugin dll into a versioned directory within System32.

    This issue should remain open until I have time to implement the full solution.

  5. modified the milestones: , on Aug 8, 2016
  6. 20 remaining items

  7. added this to the milestone on May 15, 2017
  8. joeyaiello commented on May 22, 2017

    @joeyaiello
    Contributor

    I believe that most of this logic is already encapsulated in Install-PowerShellRemoting.ps1, but we should bring it into Enable-PSRemoting.

  9. added a commit that references this issue on Aug 8, 2017
    515a999
  10. daxian-dbw commented on Aug 8, 2017

    @daxian-dbw
    Member

    Mike Richmond (@mirichmo) This issue was closed automatically after merging #2671. If this issue shouldn't be closed due the pending NanoServer scenario, feel free to re-open it.

  11. mirichmo commented on Aug 8, 2017

    @mirichmo
    MemberAuthor

    The Nano Server Scenario (registering a different instance of PowerShell Core) is covered by the install script and that still exists. I filed #4528 to document this.

  12. BatmanAMA commented on Jan 14, 2019

    @BatmanAMA

    It sounds like this is resolved, however on a new install of powershell 6.1.1 (on WS 2016) enable-psremoting fails to register a powershell.6 (or powershell.6.1.1) endpoint. I need to still use the install-powershellremoting.ps1 script.
    Is this intended? It may be worth clarifying in the docs what the psremoting setup procedure is and removing the reference to this issue. Let me know what you're thinking and I'll happily go submit a pull request to the docs repo.

  13. benmccallum commented on Dec 3, 2020

    @benmccallum

    After installing PS 7.1 and in the installer checking "Enable Remoting" or whatever the option was I couldn't remote. Full details on this SO post here.

    I found a kind of solution which is giving the windows user I'm trying to connect with Full Control of C:\Windows\System32\PowerShell\7.1.0, but I'd obviously like to know if something else has gone wrong and it seems kinda of related to what this installer was doing though I used Enable-PSRemoting in a 7.1 isntance so not sure...

    Any help would be appreciated!

  14. added a commit that references this issue on Aug 6, 2026
    fb00871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-SideBySiderelated to ability to run PS7 side-by-side with WinPS or different versions of PS7Issue-Enhancementthe issue is more of a feature request than a bugOS-WindowsResolution-FixedThe issue is fixed.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions