How to invoke Powershell version 2 on remote computer via Invoke-Command How to invoke Powershell version 2 on remote computer via Invoke-Command powershell powershell

How to invoke Powershell version 2 on remote computer via Invoke-Command


That version number is the version number of the host implementation used by remoting e.g.:

C:\PS> Invoke-Command . {Get-Host | Get-Member}   TypeName: System.Management.Automation.Internal.Host.InternalHost

You have to be using at least the PowerShell 2.0 engine because that is when PowerShell Remoting was introduced. It is more likely that you're invoking the 64-bit PowerShell remoting endpoint and you have snapins that either haven't been registered for the 64-bit PowerShell or won't run in 64-bit PowerShell (or vice versa).

If you need to invoke the 32-bit remoting endpoint try this:

C:\PS> Invoke-Command . {[intptr]::size} -ConfigurationName Microsoft.PowerShell324