Powershell version compatibility in .net

Hi guys i am running powershell in asp.net mvc5 wy application, this script works fine on local machine, but when hosting application on remote server which uses powershell version earlier than local machine it gives me the following error

Could not load file or assembly 'System.Management.Automation, Version =, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' or one of its dependencies.

I need to know how I can handle this problem.


source to share

1 answer


V3 is not allowed on the remote server.

This could be because you are targeting .NET Framework 4.0 or more into your application and want to deploy it on a Powershell 2.0 machine

You have 2 options:

Downgrade your solution to .Net Framework 3.5


Update Powershell version on your target machine



All Articles