You can fix this issue in lot of different ways depending on your environment by running below command in powershell
1.
Set-ExecutionPolicy RemoteSigned
RemoteSigned – all scripts you created yourself will be run, all scripts downloaded from the internet will need to be signed by a trusted publisher
2.
Set-ExecutionPolicy unrestricted
Unrestricted – Executes any script
3.
ExecutionPolicy ByPass -File “Script name”
Bypass a particular script
If you are in controlled or restricted environment
4.
Set-ExecutionPolicy -Scope “CurrentUser” -ExecutionPolicy “RemoteSigned”
or
Set-ExecutionPolicy -Scope “CurrentUser” -ExecutionPolicy “Unrestricted”