profile.ps1 not digitally signed

Topics: User Forum
Jun 5, 2007 at 11:48 AM
Hi folks. I've just installed the extensions, but now get an error when starting powershell:

File C:\Users\matt\Documents\WindowsPowerShell\profile.ps1 cannot be loaded. The file C:\Users\matt\Documents\WindowsPowerShell\profile.ps1 is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details..
At line:1 char:2

Can anyone help, please?

Cheers
Matt
Coordinator
Jun 5, 2007 at 2:58 PM
At the minimum you need to set the execution policy to RemoteSigned e.g.:

Set-ExecutionPolicy RemoteSigned

This means that scripts will run without digital signatures unless PowerShell can detect that the script was downloaded from the internet and then it will require those scripts to be signed before allowing them to be executed. We can look signing our scripts in a future drop but that isn't likely to happen anytime soon.
Jun 6, 2007 at 12:36 PM
Thanks for the response, but I don't think that works for a profile script?

I can't find anything in the PowerShell literature to say how I can write my own profile script but not have it signed...
Coordinator
Jun 6, 2007 at 3:35 PM

mattellis wrote:
Thanks for the response, but I don't think that works for a profile script?

I can't find anything in the PowerShell literature to say how I can write my own profile script but not have it signed...


Did you try executing the command and starting a new PowerShell session? ExecutionPolicy applies to all PowerShell scripts including profile scripts. I've been running profile scripts for several years and they've never been signed.
Jun 6, 2007 at 10:49 PM
Doh! I didn't realise it persisted across sessions - that's done the trick nicely. Thanks for your help!

Cheers
Matt