Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Standalone Windows Powershell

My Application is dependent on PowerShell version 5. But some old windows system have not installed the same version where our application is running. So is there any way to run standalone PowerShell which I put in my application folder. So my application is not dependent on system PowerShell.

like image 679
Subhash Avatar asked Mar 05 '23 10:03

Subhash


1 Answers

Disclaimer: We don't know your application and we don't know, why exactly it depends on PowerShell. Further we don't know if it depends on Windows PowerShell or on PowerShell in general. We also don't know if it requires specifically version 5 or would run in newer versions too.


To answer the core of your question:

So is there any way to run standalone PowerShell which I put in my application folder.

Yes, there is!

Microsoft introduced PowerShell Core, which started as a fork and is a cross-platform edition that runs on Windows, macOS, and major Linux distros. You can download PowerShell binary archives from GitHub, extract them and just run pwsh.exe.

Please beware:

While it provides a huge amount of well-known PowerShell-cmdlets and some (most) of the Windows PowerShell behaviour, it is important to know the difference between PowerShell Core and Windows PowerShell. Refer to the repository's README for further resources.

like image 106
Clijsters Avatar answered Mar 11 '23 18:03

Clijsters