Windows 10: Powershell Closing Immediately

Discus and support Powershell Closing Immediately in Windows 10 BSOD Crashes and Debugging to solve the problem; I've looked all of the the internet and I cannot find any information that applies to this situation. Powershell closes immediately upon starting.... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by DK__00, Feb 12, 2020.

  1. DK__00 Win User

    Powershell Closing Immediately


    I've looked all of the the internet and I cannot find any information that applies to this situation.


    Powershell closes immediately upon starting. When I run it in Command Prompt I get the following:

    Windows PowerShell terminated with the following error:

    Unable to cast object of type 'System.String' to type 'System.String[]'.


    I have checked the following folders and no profiles exist:

    c:\users\me\appdata\microsoft\windows\powershell

    c:\windows\system32\windowspowershell\v1.0\ c:\windows\systwow64\windowspowershell\v1.0\


    I have tried to run with the following commands and have no luck:

    powershell -noclose

    powershell -noprofile


    I have run the following commands and have no luck:

    sfc.exe /scannow

    DISM.exe /Online /Cleanup-image /Restorehealth


    I also have went to:

    Control Panel -> Uninstall a Program -> Turn Windows features on or off then,

    Removed Powershell, rebooted, then re-installed it.


    After doing all of these steps I still am not able to run Powershell.

    :)
     
    DK__00, Feb 12, 2020
    #1
  2. SS-WQY Win User

    PowerShell closes immediately

    hi Rivgil,

    Thank you very much for your reply. I appreciate it.

    I tried to disable and reenable the PowerShell but it didn't work.

    I also opened the link you provided, but I think it's not the issue I have. On my side, PowerShell is not stopped working, it's opened but closed immediately.

    I also tried to open PowerShell on command prompt with admin mode by running the command 'powershell /', which gives me an error - A failure
    occurred during initialization: The type initializer for 'System.Management.Automation.LanguagePrimitives' threw an exception.
     
    SS-WQY, Feb 12, 2020
    #2
  3. Rivgil Win User
    PowerShell closes immediately

    Hi, this is . An independent advisor. Sorry if this may caused any trouble. I'll be more than willing to help. We'll try to disable and re-enable the PowerShell.

    Press on Win+X keys and select Control Panel.

    From Control Panel switch to category.

    And from the list that’s displayed choose Uninstall – located under Programs.

    From the left panel of the main window click on the ‘Turn Windows features on or off’ link.

    Scroll down and locate the Windows PowerShell entry.

    Uncheck the PowerShell feature.

    Save and apply your changes.

    Restart your Windows 10 computer.

    Afterwards, repeat the steps from above and re-enable the Windows PowerShell feature.

    If that didn't work, you can try some other steps in this link
    https://windowsreport.com/windows-powershell-st...


    Note: The link provided is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any
    product advertised on the site before you decide to download and install it.

    Let me know how it goes.

    Regards,
     
    Rivgil, Feb 12, 2020
    #3
  4. SS-WQY Win User

    Powershell Closing Immediately

    PowerShell closes immediately

    I am simply trying to open PowerShell and the application closes instantly. This happens when I try opening it as an Admin.

    I tried input command 'powershell /' on command prompt in admin mode. it gives me an error: The shell cannot be started. A failure occurred during initialization: The type initializer for 'System.Management.Automation.LanguagePrimitives'
    threw an exception.

    I also tried to search for some solutions online but there is not that much helpful information.

    OS is windows10 19H1. Powershell should be the latest version, but it fails to open, I can't check its version now.

    Please provide any helpful suggestions. Thanks in advance.
     
    SS-WQY, Feb 12, 2020
    #4
Thema:

Powershell Closing Immediately

Loading...
  1. Powershell Closing Immediately - Similar Threads - Powershell Closing Immediately

  2. PowerShell closes immediately upon startup, even when running ISE or as an Admin.

    in Windows 10 Software and Apps
    PowerShell closes immediately upon startup, even when running ISE or as an Admin.: I've tried many many things to get Powershell to work, such as:Turning PowerShell on and off in optional features and restarting.System maintenance.powershell -noexitpowershell -noprofileDISM.exe /Online /Cleanup-image /Restorehealth followed by sfc.exe /scannow.Removing...
  3. Why does my PowerShell Closes immediately after selecting Run with PowerShell

    in Windows 10 Gaming
    Why does my PowerShell Closes immediately after selecting Run with PowerShell: I want to run a file using PowerShell but after after selecting Run with PowerShell. PowerShell closes immediately after launching. I couldn't capture the error message....
  4. Why does my PowerShell Closes immediately after selecting Run with PowerShell

    in Windows 10 Software and Apps
    Why does my PowerShell Closes immediately after selecting Run with PowerShell: I want to run a file using PowerShell but after after selecting Run with PowerShell. PowerShell closes immediately after launching. I couldn't capture the error message....
  5. PowerShell tab pops up and closes immediately every few minutes

    in Windows 10 Gaming
    PowerShell tab pops up and closes immediately every few minutes: Recently my PowerShell tabs keeps popping up and close immediately every few minutes for some reason its been driving me crazy. Is there anyway of fixing it ?the tab syswow64 windowspowershell v1.0 powershell.exethank you in advance...
  6. PowerShell tab pops up and closes immediately every few minutes

    in Windows 10 Software and Apps
    PowerShell tab pops up and closes immediately every few minutes: Recently my PowerShell tabs keeps popping up and close immediately every few minutes for some reason its been driving me crazy. Is there anyway of fixing it ?the tab syswow64 windowspowershell v1.0 powershell.exethank you in advance...
  7. PowerShell tab pops up and closes immediately every few minutes

    in Windows 10 Drivers and Hardware
    PowerShell tab pops up and closes immediately every few minutes: Recently my PowerShell tabs keeps popping up and close immediately every few minutes for some reason its been driving me crazy. Is there anyway of fixing it ?the tab syswow64 windowspowershell v1.0 powershell.exethank you in advance...
  8. Apps closing immediately

    in Windows 10 BSOD Crashes and Debugging
    Apps closing immediately: I'm having an issue where some apps are opening, then closing down immediately. The mouse changes to the "thinking" mode, the app never appears, then seems to close down. So the screen of the program never really shows up. This happens under both Admin and User accounts....
  9. PowerShell closes immediately

    in Windows 10 BSOD Crashes and Debugging
    PowerShell closes immediately: I am simply trying to open PowerShell and the application closes instantly. This happens when I try opening it as an Admin. I tried input command 'powershell /' on command prompt in admin mode. it gives me an error: The shell cannot be started. A failure occurred during...
  10. Immediate closing of threads

    in Windows 10 Installation and Upgrade
    Immediate closing of threads: How come when so many of us are having problems with the updates causing major problems with our pc's, and we come and try to resolve it, we get the stock answer of how to stay updated, then the thread closes. Maybe someone out there has a solution to the problem, and you are...

Users found this page by searching for:

  1. powershell closing down after opening app?

    ,
  2. powershell crashes immediately