This error typically appears when the execution policy on the PC is set to Restricted. Use the Get-ExecutionPolicy cmdlet to view the current execution policy.
PS C:\Users\username> Get-ExecutionPolicy Restricted
The Set-ExecutionPolicy cmdlet can be used to set the execution policy. There are 4 execution policies:
PS C:\Users\username> Set-ExecutionPolicy Unrestricted PS C:\Users\username> Get-ExecutionPolicy Unrestricted