Skip to content

Get-PSSessionConfiguration returns an error #1798

Closed

Description

Steps to reproduce

PS C:\> Get-PSSessionConfiguration | select name

Expected behavior

Get names of the registered session configurations.

Actual behavior

Name
----
microsoft.powershell
Exception calling "Load" with "1" argument(s): "Could not load file or assembly
'Microsoft.Powershell.Workflow.ServiceCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The
system cannot find the file specified."
At line:33 char:9
+         $serviceCore = [Reflection.Assembly]::Load("Microsoft.Powersh ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : FileNotFoundException

microsoft.powersh...
microsoft.powersh...

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSVersion                      6.0.0-alpha
SerializationVersion           1.1.0.1
GitCommitId                    v6.0.0-alpha.8
PSRemotingProtocolVersion      2.3
WSManStackVersion              3.0
BuildVersion                   3.0.0.0
PSEdition                      Core
CLRVersion

Activity

  1. added this to the milestone on Sep 29, 2016
  2. joeyaiello commented on May 24, 2017

    @joeyaiello
    Contributor

    Looks like an old call to Workflow. We should fix this.

  3. Liturgist commented on May 27, 2017

    @Liturgist

    There does not appear to be an Enable-PSRemoting command.

    I found and ran Install-PowerShellRemoting.ps1 as Administrator. That ended with:

    Get-PSSessionConfiguration powershell.6.0.0-beta.1
    Get-ChildItem : The client cannot connect to the destination specified in the request. Verify that the service on the
    destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service
    running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following
    command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
    At line:98 char:3
    +   Get-ChildItem 'WSMan:\localhost\Plugin\' -Force:$force | ? { $_.nam ...
    +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-ChildItem], InvalidOperationException
        + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.GetChildItemCommand
    

    Ran winrm quickconfig.

    PS C:\Program Files\PowerShell\6.0.0-beta.1> winrm quickconfig
    WinRM service is already running on this machine.
    WinRM is already set up for remote management on this computer.
    

    Running Get-PSSessionConfiguration yielded:

    PS C:\Program Files\PowerShell\6.0.0-beta.1> Get-PSSessionConfiguration
    
    
    Name          : microsoft.powershell
    PSVersion     : 5.1
    StartupScript :
    RunAsUser     :
    Permission    : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote
                    Management Users AccessAllowed
    
    Exception calling "Load" with "1" argument(s): "Could not load file or assembly
    'Microsoft.Powershell.Workflow.ServiceCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The
    system cannot find the file specified."
    At line:33 char:9
    +         $serviceCore = [Reflection.Assembly]::Load("Microsoft.Powersh ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : FileNotFoundException
    
    Name          : microsoft.powershell.workflow
    PSVersion     : 5.1
    StartupScript :
    RunAsUser     :
    Permission    : BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed
    
    Name          : microsoft.powershell32
    PSVersion     : 5.1
    StartupScript :
    RunAsUser     :
    Permission    : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote
                    Management Users AccessAllowed
    
    Name          : microsoft.windows.servermanagerworkflows
    PSVersion     : 3.0
    StartupScript :
    RunAsUser     :
    Permission    : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed
    
    Name          : powershell.6.0.0-beta.1
    PSVersion     : 5.0
    StartupScript :
    RunAsUser     :
    Permission    : BUILTIN\Administrators AccessAllowed
    
    PS C:\Program Files\PowerShell\6.0.0-beta.1> $PSVersionTable
    
    Name                           Value
    ----                           -----
    PSVersion                      6.0.0-beta
    PSEdition                      Core
    BuildVersion                   3.0.0.0
    CLRVersion
    GitCommitId                    v6.0.0-beta.1
    OS                             Microsoft Windows 10.0.15063
    Platform                       Win32NT
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    WSManStackVersion              3.0
    
  4. joeyaiello commented on May 30, 2017

    @joeyaiello
    Contributor

    Liturgist It looks like, despite all the errors that you got, you registered a 6.0.0-beta.1 WinRM endpoint. I'd say we should clean up all these errors, but it's still a lower priority considering the functionality appears to be working.

  5. mirichmo commented on Sep 22, 2017

    @mirichmo
    Member

    Resolved via #2671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productWG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions