When execution policy prevents execution of PowerShell scripts, you can still execute them. There is a secret parameter called “-” . When you use it, you can pipe a script into powershell.exe and execute it line by line:
Get-Content 'C:\somescript.ps1' | powershell.exe -noprofile -