Hey everyone, I'm dealing with a frustrating issue across several Server 2022 machines where attempting to launch PowerShell results in a message saying, 'One or more errors occurred' along with 'Cannot load PSReadline module. Console is running without PSReadline.' Additionally, the Server Manager either fails to launch or is unusable. The Event Viewer logs show an exception related to 'System.Management.Automation.TypeAccelerators.' I can run PowerShell Core without any problem, but the native PowerShell is completely broken, affecting various modules as well. Anyone got any insights or suggestions on how to troubleshoot this problem? I'd appreciate any help or direction to a more appropriate resource!
5 Answers
It sounds like there could be an issue with your .NET Framework installation. You might want to check if the framework is corrupted. There’s a tool suggested by Microsoft for repairing .NET installations that might help you out. Check out their guide here: https://learn.microsoft.com/en-us/dotnet/framework/install/repair. That could fix the underlying issue.
Given the error points to types in .NET, it’s likely a corruption there. Try these steps: 1) Run `sfc /scannow` and `DISM /Online /Cleanup-Image /RestoreHealth`. 2) If that doesn’t work, try reinstalling the PSReadLine module — you might need to do that from PowerShell Core since 5.1 is not launching. 3) Don't forget to check for recent Windows updates; maybe a patch caused this issue on multiple machines.
Good point! Also, consider testing with a new user profile. Sometimes the existing profile can get corrupted, causing these issues. Simply create a new local user and see if PowerShell works there. If it does, you may need to fix your existing profile.
That is strange! I haven’t encountered this with my Server setups. Have you tried launching PowerShell from a command prompt with the `-noprofile` parameter? That might bypass any problematic profile settings. If that doesn't help, I'd recommend running a system health check with DISM and SFC. Here’s the command sequence: `dism /online /cleanup-image /restorehealth` followed by `sfc /scannow`, and restart your server afterward.
Also, have you checked your group policies? Sometimes policies can block certain modules or mess with PowerShell settings. It’s worth a look to make sure nothing's been changed that might affect how PowerShell operates.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures