terminal
terminal copied to clipboard
All powershell versions dont work
Windows Terminal version
1.20.11381.0
Windows build number
22000.2538
Other Software
No response
Steps to reproduce
well there really isnt a step to reproduce this because its a personal issue with powershell that others did experience too but they didnt have a solution that worked for me, all i did was open powershell and it just closed immediatly after that
Expected Behavior
I was expecting powershell to open and work completely fine
Actual Behavior
Poweshell from windows opened but it closed immediatly so i tried downloading other versions of powershell like powershell 7 it opened but it said :
Process terminated. The type initializer for 'System.Management.Automation.Runspaces.InitialSessionState' threw an exception.
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String[], Int32)
at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
System.TypeInitializationException: The type initializer for 'System.Management.Automation.Runspaces.InitialSessionState' threw an exception.
---> System.Management.Automation.PSInvalidCastException: Cannot convert value "C:\PATH_Programs\0" to type "System.UInt32". Error: "The input string 'C:\PATH_Programs\0' was not in a correct format."
---> System.FormatException: The input string 'C:\PATH_Programs\0' was not in a correct format.
at System.Number.ThrowFormatException[TChar](ReadOnlySpan1 value) at System.UInt32.Parse(String s, NumberStyles style, IFormatProvider provider) at System.ComponentModel.UInt32Converter.FromString(String value, NumberFormatInfo formatInfo) at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) --- End of inner exception stack trace --- at System.Management.Automation.LanguagePrimitives.ConvertStringToInteger(Object valueToConvert, Type resultType, Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable) at System.Management.Automation.LanguagePrimitives.ConversionData1.Invoke(Object valueToConvert, Type resultType, Boolean recurse, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable)
at System.Management.Automation.LanguagePrimitives.ConvertTo(Object valueToConvert, Type resultType, Boolean recursion, IFormatProvider formatProvider, TypeTable backupTypeTable)
at System.Management.Automation.LanguagePrimitives.ConvertTo[T](Object valueToConvert)
at System.Management.Automation.Security.SystemPolicy.GetDebugLockdownPolicy(String path)
at System.Management.Automation.Security.SystemPolicy.GetSystemLockdownPolicy()
at System.Management.Automation.Runspaces.InitialSessionState..cctor()
--- End of inner exception stack trace ---
so im really frustrated about this because i tried everything my mind could think of.
I'm sorry, this might be better suited for the PowerShell repository. However, I wonder if your PATH environment variable contains data that PowerShell is unable to parse.
Can you open Command Prompt and run the command path?
yes it was basically that I fixed it, i created a path folder and for some reason it was like locked so i removed the lock in enviorment variables and it worked (im not very good at explaining and I dont know alot about terminal and all that, thank you anyways for the information!
Il Lun 24 Giu 2024, 18:56 Dustin L. Howett @.***> ha scritto:
I'm sorry, this might be better suited for the PowerShell repository https://github.com/powershell/powershell. However, I wonder if your PATH environment variable contains data that PowerShell is unable to parse.
Can you open Command Prompt and run the command path?
— Reply to this email directly, view it on GitHub https://github.com/microsoft/terminal/issues/17467#issuecomment-2187012221, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJMYTK4W7P5OU7FBKN7JFH3ZJBFTRAVCNFSM6AAAAABJZGZEKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGAYTEMRSGE . You are receiving this because you authored the thread.Message ID: @.***>