Powershell: Enter-pssession does not work MacOS

Created on 18 Aug 2016  路  10Comments  路  Source: PowerShell/PowerShell

PS /Users/amkellin> Enter-PSSession 10.x.x.x
Enter-PSSession : Unable to load DLL 'libpsrpclient': The specified module
could not be found.
(Exception from HRESULT: 0x8007007E)
At line:1 char:1

  • Enter-PSSession x.x.x.x
  • ~~~~~~~~

    • CategoryInfo : NotSpecified: (:) [Enter-PSSession], DllNotFound

      Exception

    • FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell

      .Commands.EnterPSSessionCommand

Also was able to crash a session trying to enter a pssession.

PS /Users/amkellin> Enter-PSSession x.x.x.x

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.BaseClientTransportManager.CloseAsync()
at System.Management.Automation.Remoting.Client.WSManClientSessionTransportManager.CloseAsync()
at System.Management.Automation.Remoting.Client.BaseClientTransportManager.Finalize()
[1] 20072 abort powershell

amkellin@Andrews-MacBook-Pro ~/tmp $ uname -a
Darwin Andrews-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

Resolution-Duplicate WG-Engine

Most helpful comment

@andrew-morris, it is in progress! See the PSRP provider. Server (Windows into Linux) is supported, and client (Linux to Windows) is in progress.

All 10 comments

PSRP client is in progress!

/cc @paulcallen

Only remoting over SSH is supported on Linux for now. Please, take a look at "PowerShell remoting over SSH" section in http://www.powershellmagazine.com/2016/08/18/open-source-powershell-on-windows-linux-and-osx/

@alexandair Well that kind of stinks was hoping to manage my Windows servers via my Macbook. But hey good job getting the code out there. I am really excited about this!

@akelling You can do that already, but you need to go over SSH for now.

This would be amazing to be able to use VMWare Powercli without having to setup SSH on a windows server.

is this related? it seems that the "libpsrpclient" does not exist yet

PS /Users/amorris> New-PSSession
New-PSSession : Unable to load DLL 'libpsrpclient': The specified module could not be found.
 (Exception from HRESULT: 0x8007007E)
At line:1 char:1
+ New-PSSession
+ ~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-PSSession], DllNotFoundException
    + FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell.Commands.NewPSSessionCommand

...a la this line:

https://github.com/PowerShell/PowerShell/blob/c1faf1e6e10fc1ce45e84ef6f49ae7136c67a111/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs#L2305

#if !UNIX
        internal const string WSManClientApiDll = @"WsmSvc.dll";
        internal const string WSManProviderApiDll = @"WsmSvc.dll";
#else
        internal const string WSManClientApiDll = @"libpsrpclient";
        internal const string WSManProviderApiDll = @"libpsrpomiprov";
#endif

@andrew-morris, it is in progress! See the PSRP provider. Server (Windows into Linux) is supported, and client (Linux to Windows) is in progress.

thanks @andschwa!

Also, Please see Known Issues - Remoting

@akelling I'm going to close this issue as it is already a known issue. Please let us know if you have any more questions.

Was this page helpful?
0 / 5 - 0 ratings