
A veces, cuando intento ejecutar un comando remoto en una sesión de PowerShell desde PowerShell en Linux, aparece este error:
Invoke-Command: la funcionalidad principal de Windows no es compatible con esta plataforma.
Desde PowerShell en Mac funciona bien, pero con PowerShell en Linux no.
Desde Ubuntu con:
$PSVersionTable
Name Value
---- -----
PSVersion 6.0.1
PSEdition Core
GitCommitId v6.0.1
OS Linux 4.4.0-1041-aws #50-Ubuntu SMP Wed Nov 15 22:18:17 UTC 2017
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Desde CentOS con:
$PSVersionTable
Name Value
---- -----
PSVersion 6.0.2
PSEdition Core
GitCommitId v6.0.2
OS Linux 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Si intento con Enter-PSSession siempre obtengo:
Enter-PSSession: actualmente se encuentra en una PSSession de PowerShell y no puede usar el cmdlet Enter-PSSession para ingresar otra PSSession.
Y luego, Invoke-Command funciona bien.