Closed gpduck closed 4 years ago
I've added the ability to manage PS versions. You can add, edit and delete em. The auto-located runs powershell.exe -NoProfile -Command { $PSVersionTable.Version }
so I'm not sure why its complaining about the profile. Either way, you can fix it if it happens.
I think you have to reopen this issue, beacuse it's not solved. In the trace I can see the following calls:
"C:\Program Files\PowerShell\7\pwsh.exe" -Command "& { $PSVersionTable.PSVersion.ToString() }" -NoLogo -NoProfile
"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "& { $PSVersionTable.PSVersion.ToString() }" -NoLogo -NoProfile
The problem is, that the switches -NoLogo
and -NoProfile
are after the -Command
and will be passed to the script block of the command as arguments instead to the PowerShell exe.
This way around should be better:
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -Command "& { $PSVersionTable.PSVersion.ToString() }"
"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -Command "& { $PSVersionTable.PSVersion.ToString() }"
Or should I open a new issue? @adamdriscoll
My pwsh.exe doesn't show the "logo" text when I launch it from the shortcut and it seems like UA is expecting to parse this to populate the "PowerShell Version" dropdown when running a script.
My dropdown looks like this:
Maybe reporting the exe name and version would be better?