PowerShell 7.0 command shell available

Microsoft company presented shell release PowerShell 7.0, the source code of which was opened in 2016 under the MIT license. New shell release prepared by not only for Windows, but also for Linux and macOS.

PowerShell is optimized to automate command-line operations and provides built-in tools for processing structured data in formats such as JSON, CSV, and XML, as well as support for REST APIs and object models. In addition to the command shell, it offers an object-oriented scripting language and a set of utilities for managing modules and scripts. Starting with the PowerShell 6 branch, the project has been developed using the .NET Core platform. Default PowerShell transmits telemetry with a description of the OS and the version of the program (to disable telemetry, you must set the environment variable POWERSHELL_TELEMETRY_OPTOUT=1 before starting).

Among the innovations added in PowerShell 7.0:

  • Support for parallelizing pipes (pipeline) using the "ForEach-Object -Parallel" construct;
  • The conditional assignment operator "a ? b : c";
  • Operators for conditionally starting threads "||" and "&&" (for example, cmd1 && cmd2, the second command will be executed only if the first one is successful);
  • Logical operators "??" and "??=", which return the right operand if the left operand is NULL (for example, a = b ?? "default string" if b is null, the operator will return a string with the default value).
  • Improved dynamic error viewing system (Get-Error cmdl);
  • Module compatibility layer for Windows PowerShell;
  • Automatic notification of a new version;
  • Ability to call DSC (Desired State Configuration) resources directly from PowerShell.

Source: opennet.ru

Add a comment