O'Reilly logo

Microsoft® Windows PowerShell™ Step By Step by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enabling Script Support

The DirectoryListWithArguments.ps1 script will not run in Windows PowerShell by default. This is because scripting support is disabled by default in Windows PowerShell. If you attempt to run a Windows PowerShell script when the support has not been enabled, an error will occur, and the script will not run. This error message is seen in Figure 4-1.

Error generated when attempting to run a Windows PowerShell script when execution policy not set

Figure 4-1. Error generated when attempting to run a Windows PowerShell script when execution policy not set

This is referred to as the restricted execution policy. There are four levels of execution policy that can be configured in Windows PowerShell by using the Set-ExecutionPolicy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required