Change the policy setting to "Enabled"
"Unrestricted" requires the same steps, in addition to the Execution Policy to "Allow all scripts".
1. Open the Group Policy editor.
2. Navigate to: Computer Configuration > Administrative Templates > Windows Components.
3. Then select "Windows PowerShell" on the left navigation list.

4. Select/open "Turn on Script Execution".
5. If ExecutionPolicy is "Unrestricted" > change configuration to "Enabled" and specify "Allow all scripts" in Execution Policy. Otherwise, just check the "Enabled" box.
For Windows Server 2012R2:
If the above-mentioned steps didn’t work, you can try changing the ExecutionPolicy to "ByPass":
1. Open the Registry Editor (regedit)
2. Navigate to key: "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell\"
3. Edit the "ExecutionPolicy" string value to "ByPass"
