If Windows has set Powershell ExecutionPolicy to AllSigned, it is not possible to run scripts unless a script is signed and also a certificate added to the Trusted Publishers in a certificate store. If the script is unsigned, it is not possible to execute it at all.

Open Local Group Policy Editor, navigate to Administrative Templates\Windows Components\Windows PowerShell, set "Turn on Script Execution" to "Enabled", and set the Execution Policy to "Allow only signed scripts". Then export and install the certificate.

To export and install the certificate:

  1. Open the properties of the signed file.

  2. Select Digital Signatures and open the MyQ Certificate Details.

    Certificate details
  3. Click on View Certificate.

  4. Click on Install Certificate.

  5. Select the Local Machine store where you want to apply the certificate.

  6. Select Place all certificates in the following store.

  7. Click on Browse, choose Trusted Publishers and click OK.

    Certificate import - selecting certificate store
  8. Finish the certificate installation.