You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add a command line option to show the version of powershell installed #1084
Area-SideBySiderelated to ability to run PS7 side-by-side with WinPS or different versions of PS7Issue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usabilityWG-DevEx-Portabilityauthoring cross-platform or cross-architecture modules, cmdlets, and scripts
Can you add a version number option so I can do powershell –version –-version or –v or –V so that I know what’s installed
bash --version
GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
This comes up against the problem where PowerShell already using -Version to specify which version to launch; a feature that will not exist in PowerShell Core. The canonical way of obtaining PowerShell's version is to inspect $PSVersionTable.
Per the "handling semver in PowerShell meeting notes", it sounds like we've closed on usurping powershell --version to actually emit the version. @JKeithB is that right?
@JKeithB Ah, I see. As of now, Hemant Mahawar (@HemantMahawar) and I don't think PowerShell Core will support its executable launching different versions of PowerShell by --version, but instead a shim launcher would support this on Windows (due to path issues), and symlinks would be used (as usual) on Linux.
PowerShell -version x.y.z
starts powershell using the specified version and
PowerShell -version
when no value is provided for version, we return the version
?
Note: we reserve the right to completely change the output of powershell -version as we try and land on the correct design for people to automate against.
Area-SideBySiderelated to ability to run PS7 side-by-side with WinPS or different versions of PS7Issue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usabilityWG-DevEx-Portabilityauthoring cross-platform or cross-architecture modules, cmdlets, and scripts
Activity
andyleejordan commentedon Jun 9, 2016
This comes up against the problem where PowerShell already using
-Versionto specify which version to launch; a feature that will not exist in PowerShell Core. The canonical way of obtaining PowerShell's version is to inspect$PSVersionTable.James Truher (@JamesWTruher) Jason Shirk (@lzybkr) Dongbo Wang (@daxian-dbw) Mike Richmond (@mirichmo) perhaps we should change
-version's behavior to emitPSVersionTable?andyleejordan commentedon Jun 14, 2016
Per the "handling semver in PowerShell meeting notes", it sounds like we've closed on usurping
powershell --versionto actually emit the version. @JKeithB is that right?andyleejordan commentedon Jun 14, 2016
@JKeithB Ah, I see. As of now, Hemant Mahawar (@HemantMahawar) and I don't think PowerShell Core will support its executable launching different versions of PowerShell by
--version, but instead a shim launcher would support this on Windows (due to path issues), and symlinks would be used (as usual) on Linux./cc James Truher (@JamesWTruher) Mike Richmond (@mirichmo) Dongbo Wang (@daxian-dbw) Raghu Shantha (@raghushantha)
jpsnover commentedon Jun 27, 2016
So isn't this as simple as
andyleejordan commentedon Jun 27, 2016
I agree with Jeffrey Snover (@jpsnover); this isn't a question of CLI syntax; we can support both. Can we get the go-ahead to implement this @JKeithB, Joey Aiello (@joeyaiello)?
lzybkr commentedon Jun 27, 2016
powershell -version and no other arguments? Then I agree, but if there are other arguments, we should expect the version number.
jpsnover commentedon Jun 27, 2016
Jason (@jason): Sounds right to me.
joeyaiello commentedon Jun 27, 2016
Note: we reserve the right to completely change the output of
powershell -versionas we try and land on the correct design for people to automate against.11 remaining items
Implement -version parameter in console host (address part of PowerSh…
Implement -version parameter in console host (address part of https:/… (
Implement -version parameter in console host (address part of https:/… (