Try running SFC Scan & DISM. Here's how to do it:
- Right-click your Windows start menu icon.
- Select Windows PowerShell (Admin).
- Type sfc /scannow and press enter and wait until it finishes.
- Check if it fixed the red error on PowerShell.
If this doesn't, try the following:
- Right-click your Windows start menu icon.
- Select Windows PowerShell (Admin).
- Type DISM /Online /Cleanup-Image /Restorehealth and press enter and wait until it finishes.
- Check if it fixed the red error on PowerShell.