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.

Advertisements
This entry was posted in Tips and Tricks and tagged . Bookmark the permalink.

4 Responses to Tip #44 | First time PowerShell, enable Scripts

  1. Pingback: Tip #44 | First time PowerShell, enable Scripts - Mark Brummel - Author of Microsoft Dynamics NAV 2013 Application Design

  2. 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 Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s