Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-PSSessionConfiguration returns an error #1798

Closed
alexandair opened this issue Aug 14, 2016 · 4 comments
Closed

Get-PSSessionConfiguration returns an error #1798

alexandair opened this issue Aug 14, 2016 · 4 comments
Labels
Issue-Bug Issue has been identified as a bug in the product WG-Cmdlets general cmdlet issues

Comments

@alexandair
Copy link
Contributor

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
@joeyaiello
Copy link
Contributor

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

@Liturgist
Copy link

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

@iSazonov iSazonov added the Issue-Bug Issue has been identified as a bug in the product label May 27, 2017
@joeyaiello
Copy link
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.

@mirichmo
Copy link
Member

Resolved via #2671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Issue has been identified as a bug in the product WG-Cmdlets general cmdlet issues
Projects
Development

No branches or pull requests

7 participants