powershell

About Powershell

With PowerShell, Microsoft offers a worthy successor to MS-DOS and VBScript. And it was about time!

For the more nostalgic, Microsoft maintains a set of commands to keep you from being lost during the transition phase between older generation shells (MS-DOS, Bash) and this brand new shell.


Examples of commands that you can still use with PowerShell and their equivalent with native commandlets:
help or man becomes Get-Help
dir or ls becomes Get-ChildItem
cd becomes Set-Location
copy or cp becomes Copy-Item
etc.

And this help is not too much for the handling because apart from the change of name of the controls, it is a whole philosophy which is reviewed.

In particular, the old shells have text outputs which very often require the manipulation of character strings with commands, certainly effective, but not trivial to take in hand such: sed, awk, cut, grep, etc.

From now on, the outputs of the commands are in the form of objects or a collection of objects. Forget about cutting the chains!

Examples

Number of threads of the 6th process:
(Get-Process) [5] .Threads.Count

Filter on the DisplayName property of the Service object:
Get-Service | Where-Object {$ _. DisplayName -like « Identi * »}

This shell does not remain a mere concept but becomes an integral part of Windows systems. It’s not for nothing that PowerShell is the second icon pinned to the taskbar on Windows 2008 Server systems. This shows Microsoft’s desire to push its latest product and generalize its use by administrators.

And far from making it a gadget, Microsoft is returning to the land of Linux systems predilection, namely administration via scripts and administration of servers entirely from the command line. So all new Microsoft server software comes with its own set of PowerShell commands to administer them. And more particularly when you have to administer servers installed in Core mode, that is to say without a graphical interface.

PowerShell will be of interest to all administrators whether for the daily management of their servers or for Active Directory, Exchange, IIS 7, WMWare, RDS, SQL Server, SharePoint, etc.

With the arrival of Windows 8 Server, Microsoft has gone even further and the last bits of administration that were not yet ported to PowerShell are now. As proof: on Windows 2008 R2, the modules available by default were 7 in number, while they are now 52 in Windows 8 Server.

The future of system administration in Windows will therefore require mastery of this new essential tool for the automation of all common tasks.