locked
PowerShell window opens and closes immediately RRS feed

  • Question

  • I'm using Windows 7 x64 Pro, just recently updated to Windows Management Framework 5.0 (Win7AndW2K8R2-KB3134760-x64.msu).  Ever since the update, whenever I click the powershell icon, the command console opens and closes immediately. 

    Error message:

    Windows PowerShell terminated with the following error:
     Could not load file or assembly 'System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PubblicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.

    I have tried uninstalling and re-installing Win7AndW2K8R2-KB3134760-x64.msu, still without success in fixing this issue.

    Friday, May 20, 2016 6:00 PM

Answers

  • It looks like I had a corrupted install of .NET Framework 4.6.1 (from Windows Update). I manually downloaded offline installer for .NET Framework 4.6.1 (NDP461-KB3102436-x86-x64-AllOS-ENU.exe), reinstalled and it fixed my issue.

    Thanks all! :)

    • Marked as answer by rocfob83 Monday, May 23, 2016 10:00 PM
    Monday, May 23, 2016 9:58 PM

All replies

  • Did you install WMF4 first? I believe that's a prereq, but I don't remember off the top of my head.

    • Proposed as answer by Elaine Jing Monday, May 23, 2016 7:51 AM
    Friday, May 20, 2016 6:03 PM
  • Net framework prereq missing???

    \_(ツ)_/

    Friday, May 20, 2016 6:09 PM
  • No, I installed WMF5 upon the fresh installation of Windows 7.  AFAIK WMF4 is not a prerequisite for WMF5.

    For troubleshooting, I tried uninstalling WMF5, installed WMF3 and then upgraded to WMF4, and then finally WMF5.  This did not solve my problem neither.

    Monday, May 23, 2016 2:27 PM
  • AFAIK WMF4 is not a prerequisite for WMF5.

    Yep, it is. See the 'Install Instructions' here:

    https://www.microsoft.com/en-us/download/details.aspx?id=50395

    Do you meet all of those?


    Monday, May 23, 2016 2:30 PM
  • I repeat --- ???

    Microsoft .NET Framework 4.5 or above is installed. https://msdn.microsoft.com/en-us/library/5a4x27ek(v=vs.110).aspx


    \_(ツ)_/

    Monday, May 23, 2016 3:02 PM
  • Yes, all updates applied. I have tried upgrading from WMF 4.0 to 5.0, still the same issue.

    Can't seem to find exactly which version of .NET framework I have.

    I ran

    wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version

    but was returned WMIC.exe : No Instance(s) Available.At line:1 char:1

    I tried re-installing .NET framework (NDP452-KB2901907-x86-x64-AllOS-ENU.exe), but get error:

    .NET Framework 4.5.2 or a later update is already installed on this computer.

    Seems like I am dealing with a corrupted installation of .NET Framework...


    Monday, May 23, 2016 9:49 PM
  • I tried re-installing .NET framework (NDP452-KB2901907-x86-x64-AllOS-ENU.exe), but get error:

    .NET Framework 4.5.2 or a later update is already installed on this computer

    Monday, May 23, 2016 9:54 PM
  • It looks like I had a corrupted install of .NET Framework 4.6.1 (from Windows Update). I manually downloaded offline installer for .NET Framework 4.6.1 (NDP461-KB3102436-x86-x64-AllOS-ENU.exe), reinstalled and it fixed my issue.

    Thanks all! :)

    • Marked as answer by rocfob83 Monday, May 23, 2016 10:00 PM
    Monday, May 23, 2016 9:58 PM
  • It looks like I had a corrupted install of .NET Framework 4.6.1 (from Windows Update). I manually downloaded offline installer for .NET Framework 4.6.1 (NDP461-KB3102436-x86-x64-AllOS-ENU.exe), reinstalled and it fixed my issue.

    Thanks all! :)

    To confirm. 
    I upgraded a 2008 R2 from Powershell 2 to WMF 5 (+ reboot)

    I had the same issue with Powershell opening and immediately closing.

    It appeared that I needed .NET Framework 4.6.1

    Powershell 5 worked again immediately after installing .Net 4.6.1

    WMF 4 was NOT a pre-requisite.



    • Edited by Mith UK Saturday, June 18, 2016 7:20 PM
    Saturday, June 18, 2016 7:18 PM
  • There is a Net repair tool that you should run whenever you suspect issues.  It gets its instructions online so it should always be up-to-date.

    https://www.microsoft.com/en-us/download/details.aspx?id=30135


    \_(ツ)_/

    Saturday, June 18, 2016 7:41 PM
  • I had the same issue with Power Shell opens and closes immediately, but the issue has been fixed after installing "Windows Management Framework"

    • Proposed as answer by Vijay B .Girija Tuesday, October 3, 2017 8:57 PM
    • Unproposed as answer by jrv Tuesday, October 3, 2017 9:52 PM
    Tuesday, October 3, 2017 8:57 PM
  • Thank you for the resolution. this solved my Problem.

    Download: https://www.microsoft.com/en-us/download/details.aspx?id=49982 


    Friday, September 6, 2019 8:06 PM