PowerShell 3.0 is shipped with Windows 8. We are still experiencing some of the great features of Windows Server 8, but PowerShell 3.0 also brings many new features. Thanks to PowerShell Product Team for such a great innovation.
In this blog post, I will discuss about some of simplified syntaxes.
PowerShell Integrated Script Environment has an improved UI design and features.
This is new designed PowerShell ISE console.
Right pane you’ll notice Commands section.
As you know, in PowerShell V2 you have to query available commands or syntax with get-help or Tab button.
In PowerShell 3.0 you can search any kind of command within Commands pane. I searched for commands that includes “printer” and it outputs all available commands.
And also it provides me all required or optional parameters for selected command.
Now i can select Get-Printer cmdlet and fill up mandatory or optional params.
Now just click copy and paste into script pane.
This is a great feature especially for those who don’t like much writing or remembering script syntax.
Another great feature is improved Tab button Now it completes automatically for all kind of parameter, argument etc. within a window.
In below example, I just write Get-Pro and press tab. It brings all available commands that start with Get-Pro
It also brings parameters and arguments.
And finally it gets to you all available processes on your system lively !
Another example of argument auto completion:
Auto completion also works for .Net. If you call [System.Net.DNS] it will bring you all available methods.
Error notification is also available lively.
I think one of the greatest features of PowerShell 3.0 is statement help.
If you press CTRL + J, it will bring you all statements with their usage and examples.
But this is not enough.
Just click one of the statements and then it will paste a template usage example into your Script Pane.
This is a great feature cause I believe many system administrators don’t want to remember usage of each statement. They don’t need any more.
With PowerShell 3.0, you don’t need special $_. Character to filter script outputs.
Below is a simple example in PowerShell 2.0 to get a process that has a name “IDLE”. For complex scripts it is open for mistakes.
In PowerShell 3.0 just put a pipe and write only column name with no special character. It works and looks great.
It’s same for foreach too.
This is a brief post about PowerShell 3.0 features. There are bunch of great features and we will figure out them in our next blogs.
Maheshkumar S Tiwari edited Original. Comment: Added tags