Hi,
This issue usually occurs if you do not run Power shell as an Administrator.
Try the following steps and check if it helps:
a) Right-click your PowerShell icon and select Run as administrator.
b) Check the current script execution policy by using the Get-ExecutionPolicy cmdlet. To do this, input “Get-ExecutionPolicy” (without quotes) and press Enter on your keyboard. PowerShell will return a value of Restricted.
c) To change the script execution policy, use the Set-ExecutionPolicy cmdlet. Input “Set-ExecutionPolicy unrestricted” (without quotes) and press Enter on your keyboard.
d) To ensure that the script execution policy has been changed, use the Get-ExecutionPolicy cmdlet again. PowerShell should return a value of Unrestricted.
e) You should now be able to run your PowerShell scripts.