I have just installed the open-source version of PowerShell for Linux on Arch Linux using the powershell-git package from AUR. When I try PowerShell's -Version functionality, I get the following:
PS /home/user> powershell -Version 5.1                                          
-Version : The term '-Version' is not recognized as the name of a cmdlet, 
function, script file, or operable program. Check the spelling of the name, or 
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ -Version 5.1
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (-Version:String) [], CommandNot 
   FoundException
    + FullyQualifiedErrorId : CommandNotFoundException
How to fix this?



pwshin the cross-platform version. PowerShell Core is from version 6.0 onward, the previous versions are Windows-only so you can't specify 5.1 or lower