1

Sometimes, When I try to execute a remote command in a PowerShell Session from PowerShell in Linux, I get this error:

Invoke-Command : Windows Principal functionality is not supported on this platform.

From PowerShell in Mac works fine, but with PowerShell in Linux doesn't.

From Ubuntu with:

$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

From CentOS with:

$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

If I try with Enter-PSSession I get always:

Enter-PSSession : You are currently in a PowerShell PSSession and cannot use the Enter-PSSession cmdlet to enter another PSSession.

And then, Invoke-Command works fine.

Invoke-Command works after get an error from Enter-PSSession

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.