The execution of scripts is disabled on this system. Please see “get-help about_signing” for more details. FullyQualifiedErrorId : RuntimeException

Often you face following error when you try to use the powershell for the first time.

File C:\Windows\system32\SQLServiceRecycle.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
At line:1 char:24
+ .\SQLServiceRecycle.ps1 <<<<    + CategoryInfo          : NotSpecified: (:) [], PSSecurityException    + FullyQualifiedErrorId : RuntimeException

The reason of this error is that the execution policy is not set correctly.

Run following command: GET-ExecutionPolicy

The result will be restricted.

Now to fix this set the execution policy to unrestricted as follows:

Now you can run the script without any hindrance.

INTERVIEW PREPARATION IN 30 MINs – Read Following wires for a quick interview preparation.

  1. SQL Server DBA “Interview Questions And Answers”
  2. SQL Azure Interview Questions and Answers Part – 1
  3. SQL Azure Interview Questions and Answers Part – 2
  4. Powershell Interview Questions and Answers

Regards,
Online Powershell and SQL Classes @ http://tuitionaffordable.webstarts.com

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s