Hello
Greetings!
You can try to change the execution policy as mentioned in the link below. And then check if it helps.
https://lazyadmin.nl/powershell/run-a-powershell-script/
Windows Server 2022 Security Baseline | Microsoft Community Hub
Best Regards,
Daisy Zhou