If you have tried to run a PowerShell script that isn’t signed, you’ve likely run into the security error “File … cannot be loaded. The file is not digitally signed. The script will not be executed on the system. “ This means that the script is not trusted to be run on your system.
If you’d like to sign the script, here is a walkthrough:
Alternatively, you can change your signing policy. This tends to be the practice most of the time… ;)
You can choose, “Set-ExecutionPolicy Unrestricted” or, replace unrestricted with “Restricted”, “AllSigned”, or “RemoteSigned”