Repository navigation
Closed as duplicate
Labels
Resolution-AnsweredThe question is answered.The question is answered.Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.Resolution-FixedThe issue is fixed.The issue is fixed.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
I installed the latest version of pwsh using the command "winget install --id Microsoft.PowerShell --source winget". However, this issue occurs every time a new version of pwsh is released on my computer. When I reinstalled the latest pwsh using the command "winget install --id Microsoft.PowerShell --source winget", pwsh could open normally again. But the same problem would occur again when a new version was released.
Expected behavior
normal startActual behavior
The startup failed and it cannot be used. Only by installing a new version through a command can it be used normally.Error details
PowerShell 7.6.8
Process terminated.
totalWidth ('-17') must be a non-negative value. (Parameter 'totalWidth')
Actual value was -17.
at System.Environment.FailFast(System.Runtime.CompilerServices.StackCrawlMarkHandle, System.String, System.Runtime.CompilerServices.ObjectHandleOnStack, System.String)
at System.Environment.FailFast(System.String, System.Exception)
at System.Environment.FailFast(System.String)
at Microsoft.PowerShell.ManagedPSEntry.Start(System.String[], Int32)
at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
System.ArgumentOutOfRangeException: totalWidth ('-17') must be a non-negative value. (Parameter 'totalWidth')
Actual value was -17.
at System.ArgumentOutOfRangeException.ThrowNegative[T](T value, String paramName)
at System.String.PadRight(Int32 totalWidth, Char paddingChar)
at Microsoft.PowerShell.UpdatesNotification.ShowUpdateNotification(PSHostUserInterface hostUI)
at Microsoft.PowerShell.ConsoleHost.Start(String bannerText, String helpText, Boolean issProvidedExternally)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)Environment data
Name Value
---- -----
PSVersion 7.6.9
PSEdition Core
GitCommitId 7.6.9
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
Metadata
Metadata
Assignees
Labels
Resolution-AnsweredThe question is answered.The question is answered.Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.Resolution-FixedThe issue is fixed.The issue is fixed.
Activity
kilasuit commentedon Nov 2, 2026
Your image shows this is running in 7.6.6.
This issue has been fixed in 7.6.8 onwards by the removal of the code that provided the update notification during startup.
You can get round this in 7.6.6 by setting the documented env var
POWERSHELL_UPDATECHECKtoOFFand then upgrading PowerShell.lzb-libra commentedon Nov 3, 2026
The version number in my picture is 7.6.6 because I forgot to take a screenshot at that time, so I used the screenshot from an earlier version. When I opened the local 7.6.8, the same problem occurred, preventing me from using it. Then, I installed the latest version 7.6.9 using the command "winget install --id Microsoft.PowerShell --source winget" and it worked properly. I won't change the configuration you mentioned for now and will observe one version to see if the problem persists.