Block or disable PowerShell in Windows 11/10 using Security Policy or Local Group Policy Editor. You can also uninstall PowerShell 7.