To unblock a PS1 file in PowerShell, you can use the following command:
- Unblock-File -Path "C:\Path\To\Script.ps1".
- Replace "C:\Path\To\Script.ps1". with the actual path to the PS1 file you want to unblock.
Alternatively, you can also unblock a file through the file properties in Windows Explorer:
- Right-click on the PS1 file and select Properties.
- In the Properties window, click on the General tab.
- Click on the Unblock button next to Security.
- Click OK to save the changes.
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUse