DevoutSkeptic,
Welcome to the forum. ![]()
First of all … This forum is more about challanges you have with your PowerShell code than about PowerShell related system issues.
Second … if your program expects an old SQL Server and PowerShell 2.0 which isn’t supported anymore you can no longer run it securely.
The best option would be to look for a current version of your program or a current other program replacing your old and unsupported solution.
If that’s not possible yet you may consider running it in a locked down VM with Windows 10 with all needed dependencies it needs. This way you buy some time to transition to a supported scenario for your use case.
The worst option would be to try to manipulate your production Windows 11 because it would introduce vulnarabilities you cannot get fixed.