Tip #44 | First time PowerShell, enable Scripts

This post is more a reminder for myself, each time I run into this when installing NAV on customers machines I have to search for the command.

I love modern development, PowerShell, TFS, etc. But it does not make life easier to understand all these technologies.

When running PowerShell on a new machine you might encounter this error:

PowerShell Script Disabled

It is telling you that PowerShell scripts are disabled.

Enabling is easy by running the Windows PowerShell IDE as administrator and executing this:

PowerShell Script Enabled

Works for me. After this I can work with the Development Commandlets.

1 Comment

  1. Marco Engel says:

    I’d suggest you would run in remotesigned mode. The NAV powershell tools are signed with a certificate and thus will run. Unrestricited will make your machine more vulnerable to “script kiddies” basically you will get a machine where it will run any script any time.
    If your script does not work in remotesigned, then you can always try to run the script creating a powershell.exe -file “script file goes here.ps1” -executionpolicy bypass.
    Powershell will then run the script in the Unrestricted mode, but only that script.

    Like

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.