Error code 5 (0x00000005) typically indicates an "Access Denied" error in Windows. This suggests that PowerShell is failing to launch due to insufficient permissions or other access-related issues.
Right-click on PowerShell and choose "Run as Administrator."
If this works, it confirms a permissions issue.
Open Control Panel > User Accounts > Change User Account Control settings.
Try lowering the UAC level temporarily.
Open Command Prompt as admin and run sfc /scannow and hit the Enter button.
then: DISM /Online /Cleanup-Image /RestoreHealth and hit the Enter button.