Historically, the command-line support in Windows has always been considered laughable in spite of the scripting languages like VBScript and Jscript.
These languages are not natively integrated into the shell, have a meager documentation, and have a lot of exploitable vulnerabilities.
However, the day Windows PowerShell released, *NIX geeks had to throw their Windows command-line related trolling out of the window.
Windows PowerShell is an extremely powerful command-line automation framework built on top of .NET framework. It also provides full access to the ancient COM and WMI components of Windows.
Thus, you can user PowerShell to tweak any corner of Windows. It provides a very powerful programming interface. You can write PowerShell script to manage all kinds of administrative tasks on Windows.
The commands in PowerShell are called cmdlets, pronounced as command-lets. A cmdlet is a .NET class, designed to do a single task. A cmdlet can channel its output to another cmdlet.
Thus, one can combine several cmdlets to perform any kind of administrative task. A PowerShell script is a collection of several cmdlets to perform a task.
PowerShell itself provides a very basic command-line interface to write and execute scripts. This can become a huge pain in case you wish to write lengthy scripts.
Microsoft has mitigated this need by introducing PowerShell Integrated Scripting Environment. It is a GUI-based PowerShell host that provides integrated debugger, syntax highlighting, tab completion, a tabbed UI, as well as the ability to run only the selected parts in a script.
The so-launched window looks similar to an Integrated Development Environment.
The ISE is divided into three panes.
As an example, I have written a two-line script in the scripting pane.
The first line uses a simple echo (an alias of Write-Host) command to print a message “Number of the current week of 2012 is –“.
The following line runs a cmdlet Get-Date that fetches today’s date. By passing it two attributes to it, I asked the cmdlet to morph the output to display only the current number of week.
When I ran the script, it displayed the desired output in the console pane.
ISE provides several rich development features like: