Falta de provedor WSMan no PowerShell Linux (para usar remoting)

2

Estou tentando o PowerShell remoto do Linux para um Windows Nano Server no Azure.

Há uma parte nas instruções em que adiciono o IP do servidor remoto aos hosts confiáveis do computador local:

PS > Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value "1.2.3.4"                                          
Set-Item : Cannot find drive. A drive with the name 'WSMan' does not exist.
At line:1 char:1
+ Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value "1.2.3 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (WSMan:String) [Set-Item], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetItemCommand

Se eu ignorar esta mensagem e tentar me conectar, recebo um erro:

PS > Enter-PSSession -ComputerName "1.2.3.4" -Credential joe -Authentication Basic -Verbose -Port 5985
Windows PowerShell credential request
Enter your credentials.
Password for user joe: **************

Enter-PSSession : Connecting to remote server 1.2.3.4 failed with the following error message : Authentication Failure For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -ComputerName "1.2.3.4" -Credential joe -Aut ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (1.2.3.4:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

Tudo que eu já vi sobre a adição do provedor WSMan é que preciso executar Enable-PSRemoting , que não existe no meu Linux PowerShell, e também parece ser destinado ao computador remoto (e o Nano Server o habilitou por padrão).

    
por joelanders 04.08.2017 / 15:47

0 respostas