Reputation: 139
I have encountered an error when trying to launch Powershell ISE. The launch starts with 'Loading' displayed in the splash panel, then a dialog box comes up with "An unexpected error has occurred, and Windows PowerShell ISE must close" I have Googled this error and come up with nothing specific, but I have followed a few steps that have been suggested for fixing other issues.
Platform: Windows 8.1 Pro
Powershell ISE product version: 10.0.14409.1005
(Cannot open shell so cannot run cmdlet to get exect version details)
Things I have tried
1 The plain Powershell shell **does** launch.
2 Tried launching ISE with -NoProfile & -MTA switches no luck
3 Rename powershel_ise.exe.config so it cannot be read in both System32 & WOW64 folders
4 Upgrade .NET Framework to 4.5.1
5 Upgrade Management Framework to 5.1
6 Other machines within our environment with same image and patch level have **not** encountered this problem
7 Cannot find an associated error in the Event viewer logs
I really don't want to blow the machine away and start again so any suggestions or fix would be appreciated !
Angus
Upvotes: 3
Views: 4765
Reputation: 1
AutoSaved files are located within AppData of the user profile. If there is a problem reloading any AutoSaved files, you may receive "An unexpected error has occurred, and Windows PowerShell ISE must close"
Before resorting to deleting the user profile, I would try deleting or renaming this this path first:
%userprofile%\AppData\Local\Microsoft_Corporation\PowerShell_ISE.exe_StrongName_lw2v2vm3wmtzzpebq33gybmeoxukb04w\3.0.0.0
Upvotes: 0
Reputation: 1
Go to Documents C:\Users<loggedinProfileName>\Documents\WindowsPowerShell and re name from WindowsPowerShell to Old_WindowsPowerShell it will work if its crashes because for user profile.
Upvotes: 0
Reputation: 1
"I renamed the C:\Users<name>\Documents\WindowsPowerShell directory and re-ran ISE and it didn't crash. Something up with that profile directory for me... – Duncan Smart Feb 10 '21 at 11:07"
Solved my similar issue! :D
Upvotes: 0
Reputation: 2365
I had the same issue, I was able to fix it with recreating my user profile.
You can log as different user and try to run powershell_ise in that profile, if it runs, so more likely you can fix it. Just have somebody with admin rights delete your profile, and then just log back. Or if you have admin rights go create another account with admin, go to system properties / user profiles and remove your current profile ( just save files you need to keep)
Upvotes: 3