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
I wanted to do some testing with PowerShell in docker. The natural choice is to use the .NET SDK container image. But I ccan't because PowerShell is installed in a bespoke way.
root@88f149c70769:/# dotnet tool list -g
Package Id Version Commands
-------------------------------------
root@88f149c70769:/# dotnet tool install -g powershell
Tools directory '/root/.dotnet/tools' is not currently on the PATH environment variable.
If you are using bash, you can add it to your profile by running the following command:
cat << \EOF >> ~/.bash_profile# Add .NET Core SDK toolsexport PATH="$PATH:/root/.dotnet/tools"EOF
You can add it to the current session by running the following command:
export PATH="$PATH:/root/.dotnet/tools"
You can invoke the tool using the following command: pwsh
Tool 'powershell' (version '7.5.4') was successfully installed.
root@88f149c70769:/# export PATH="$PATH:/root/.dotnet/tools"
root@88f149c70769:/# which pwsh
/usr/bin/pwsh
I wanted to use the GA version, but that's not convenient. If PowerShell was installed as a tool, I could.
Activity
richlander commentedon Mar 11, 2026
@baronfel
lbussell commentedon Mar 11, 2026
One consideration here is that I don't see any pre-release PowerShell versions available on NuGet.org: https://www.nuget.org/packages/PowerShell#versions-body-tab
richlander commentedon Mar 11, 2026
That may also be telling.
lbussell commentedon Mar 16, 2026
[Triage] I'll investigate this and see if it's feasible/compatible with the current way we ship PowerShell in our images.