Powershell, Bash command window on Windows and Linux

Powershell is a Bash-style command window for Windows (and now Linux), but with a domain-specific scripting language.

This successor to the ancient MS-DOS window offers advanced scripting features.

It transitioned in April 2011 under the Community Promise license, making it free and can be implemented under any platform. So under Linux, what was done with the Pash project, which runs on Mono. In 2008, its development was discontinued, but in 2012 the project was resumed by donors. Now the project is outdated, from August 18, 2016.

On August 18, 2016, the Powershell source code was opened by Microsoft and becomes available on Linux and Mac. Based on .NET Core, it provides access to an extensive library of functions .
It can be downloaded on GitHub. After Bash in the Linux subsystem in Windows 10, so we have the choice of a full command line with the opposite Powershell in Linux!

Scripting and Administration Tool

The command line window, so familiar to Unix or Linux or MS-DOS users and also often called the MS-DOS window, does not disappear under Vista, on the contrary, it approaches what Linux offers and is being upgraded with very powerful features. In addition, it is also available for Windows XP through downloads on the Microsoft website.
The codename was Monad, in reference to a term used by Leibniz in philosophy that treats the world as components, monads, interaction, and harmony.
Powershell allows you to manage the computer, manage processes and sessions connected by users, all network management and therefore replace Perl.

Powershell

Examples of innovative features in Powershell

Powershell provides access to most Windows features, including services, applications, voice. In addition, its display no longer has anything to do with the MS-DOS screen, it can be made in graphics...

You can select the following code samples using the mouse and right-click in Powershell to insert the code and execute it...

Microcalculator

whatif

Transcript

Use apps

Voice

Graphics system

Programming

Code Editor

Chain (oil pipeline)

Creating files

Alias

Running a script in a file

Unix compatibility

Accessing System Data

Powershell returns all relevant information about the Bios, processor and all computer system components, operating system, software, updates, etc.
For example, try the following command:

Get-WmiObject -Class Win32_BIOS -ComputerName .

not forgetting the dot at the end, and you'll learn all about your computer's BIOS!
To find out the free space on your hard drives, try:

Get-WmiObject -Class Win32_LogicalDisk

Many other examples are provided in the user guide.

Cmdlets extend the base language

"Commands" are internal applications that provide access to Windows resources.
The previously used New-Object parameter is a cmdlet. All cmdlet names consist of two words separated by dashes.
Enter, for example:

PS c:\get-service

and you'll get a list of all the services available on Windows.
Cmdlets appear as objects, while on Unix they are passed between text commands. But the results are given as text when they are displayed on the screen.

Further information

Download from Download Center on the Microsoft website. The archive contains a French user manual and a memo for the Windows Powershell scripting language.

See also: