Skip to content

PowerShell crash when Invoke-Command and WinRM isn't available #4383

Closed

Description

New NanoServer container images don't have WinRM

docker run -it microsoft/nanoserver-insider-powershell
invoke-command -computername . -command { get-command }

Expected:
an error that winrm is required

Actual:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Management.Automation.Remoting.PrioritySendDataCollection.Clear()
   at System.Management.Automation.Remoting.Client.WSManClientSessionTransportManager.CloseAsync()
   at System.Management.Automation.Remoting.Client.BaseClientTransportManager.Finalize()
Invoke-Command : Unable to load DLL 'WsmSvc.dll': The specified module could not be found. (Exception from HRESULT:
0x8007007E)
At line:1 char:1
+ Invoke-Command -ComputerName . -Command { get-command }
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-Command], DllNotFoundException
    + FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell.Commands.InvokeCommandCommand

Activity

  1. added
    WG-Remoting
    on Jul 28, 2017
  2. added this to the milestone on Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Resolution-FixedWG-Remoting

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions