January 2008
Intermediate to advanced
688 pages
19h 12m
English
You can't simply double-click a Windows PowerShell script and have it run. You cannot type the name in the Start | Run dialog box, either. If you are inside Windows PowerShell, you can run scripts if you have enabled the execution policy, but you need to type the entire path to the script you want to run and make sure to include the .ps1 extension.
If you need to run a script from outside Windows PowerShell, you must type the full path to the script, but you must also feed it as an argument to the PowerShell.exe program. In addition, you probably want to specify the -noexit switch so you can read the output from the script inside the Windows PowerShell console. This syntax is shown in Figure 2-5.
Figure 2-5. To ...
Read now
Unlock full access