1

I am trying to login to windows 2008 server "C" from my machine "A". There is machine in between "B" serving as jumpbox running windows server 2008 and running "SSH-Enabled PowerShell Access for Windows (powershellserver.com)"

I am doing ssh to the machine B from my machine "A". From the machine B I am able to create PSsession to machine C but not able to enter the session, below is the error I am seeing.

    PS C:\Users\Documents>  New-PsSession -Credential $mycreds -Computername x.x.x.x

 Id Name            ComputerName    State         ConfigurationName     Availability
 -- ----            ------------    -----         -----------------     ------------
228 Session228      x.x.x.x Opened        Microsoft.PowerShell     Available


PS C:\Users\Documents> Get-PSSession | Remove-PSSession
PS C:\Users\Documents> $session =  New-PsSession -Credential $mycreds -Computername x.x.x.x

PS C:\Users\Documents> enter-pssession $session
enter-pssession : The method or operation is not implemented.
At line:1 char:1
+ enter-pssession $session
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [Enter-PSSession], PSNotImplementedException
    + FullyQualifiedErrorId : NotImplemented,Microsoft.PowerShell.Commands.EnterPSSessionCommand

When I am logging to the machine B using RDP and then taking the session on Machine C, its working fine. Then why it is not working from ssh session.

Let me know if further clarification is needed.

Thanks in Advance!

1 Answer 1

0

You have to use the commands below

$s = New-PSSession -ComputerName Server02 -Credential Domain01\User01
Invoke-Command -Session $s -ScriptBlock {commands....}
1
  • @kasperd : thanks for clarifying (I should have know that, sorry). Mar 23, 2016 at 16:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .