The Shell with Power! PowerShell 2.0 [how to activate script execution]
Sick of *.bat – shell scripts? – Powershell (2.0)!
It’s not really something new, but I just did need it until now. So I’m surprised by the mighty of it. Additional it comes with a small IDE which makes developing and debugging very handy.
Before you enjoy the power of the shell you have to activate the script execution within your system. Therefore you have to set the execution policies:
Start the PowerShell as administrator
Get-ExecutionPolicy
Displays the current policy
Set-ExecutionPolicy RemoteSigned
This sets a policy. Valid values are:
- Restricted -> Impossible to run any PS script (standart)
- AllSigned -> Each script needs to be signed (check PS Blog for details). Possible choice but to unhandy for my taste.
- RemoteSigned -> Each local script can run unsigned, scripts from the web need to be signed. My choice!
- Unrestricted -> Each script runs! Way to insecure!!!
After changing the policy it’s possible to run your scripts. You can simply work with a text editor (eg. Notepad++) and save the script as *.ps1. If you’re doing so, you can start the script by double click in your file browser.
Even more comfortable is the PowerShell ISE. It comes with syntax highligthing, part execution and real debugging.
Finally I have an other scope: Using it as a calculator! Nice if you want to see your calculation and not just the final result. More…
Cheers Mavi
