PowerShell 7.0 was released: in A Shell in order to (almost) everything and (almost) everything


The Windows PowerShell 7.0 is available for Windows (Windows 7 and Windows Server 2008 R2), Linux (various distributions) and Mac os (Version 10.12). The focus is on the management of the functions of Windows PowerShell-5.1.

Since 2006, we have the in the .The microsoft .NET Framework-based Windows PowerShell, with its object-oriented Pipeline that is established as an Alternative to the traditional Scoops with the string-based Pipeline. In January of 2018 in order to restart The PowerShell Core-6.0 is based on, then it’s more .The NET Core, and it ran not only on Windows but also on Linux and mac os. In particular, due to the limitations of the available base classes .NET Core, that was the problem, but it is a lot less powerful than the final Version 5.2 of the Windows PowerShell in exchange online.

PowerShell-7.0 is developed as an Open Source project on GitHub. We have received a number of contributions from developers outside their own company. In the windows Azure Cloud, Shell, in the Cloud, Microsoft’s web Portal has already been converted into a PowerShell 7.0 or later versions.

Now .NET is a Core part of a lot of classes from the classic .The .NET Framework is assumed. For the published PowerShell 7.0 (with no Core in the name) is used as the Basis for the current one .NET-Core-3.1.1. Thus, the functional differences between the Windows PowerShell and 6.1, and PowerShell, the 7.0 is significantly reduced. A lot of the Commandlets in PowerShell. Core 6.the x is missing, for example, to the clipboard, printing and graphic expenses, they are now in the PowerShell 7.0 is returned.

The functional difference between the Windows PowerShell and the 5.1 and PowerShell 7.0 has not gone away, however. A quick test of what the author has revealed the following picture of the preview version of Windows 10 20H1:

The number of commands in the Windows PowerShell, you receive the 5.1

One thousand five hundred eighty-six

New commands in PowerShell to 7.0

+ 16

In the absence of any command at the PowerShell 7.0

– 95

The number of commands in PowerShell, 7.0

One thousand five hundred seven

In order to join the as-yet missing features in PowerShell to 7.0, in particular:

  • WMI-Commandlets, the first Generation of the windows management instrumentation (v1), as Get-WmiObject and Invoke-WmiMethod. Windows management instrumentation (WMI-v2-Commandlets as Get-CimInstance and Invoke-CimMethod but they are not supported.
  • Join to Windows domains Add-Computer
  • The start Workflows in PowerShell is the technology based on the Windows Workflow Foundation, and not on the inside .NET-Core
  • Using the PowerShell Snap-in (Add-PSSnapin, Remove-PSSnapin). From the PowerShell Core-6.0-modules only.
  • To access the event log of WindowsGet-EventLog, Write-EventLog etc.).
  • Support for transactions (Get-Transaction, Complete-Transaction, Undo-Transaction etc.).
  • Commandlets for Microsoft User Experience Virtualization (UE-V)

Already in PowerShell. Core 6.the x was in command of the neutrality of the platform is broken, and only Windows were available (e.g. for service management, user management, and file permission assignment). In PowerShell, 7.0, has expanded this list to the command, the output of the graphics to produce, for example, Out-GridView and Show-Command). These instructions are based on Windows Presentation Foundation (WPF), the .NET Core from Version 3.0 .NET, Core, Desktop, Windows Runtime, but not for gnu / Linux and macOS it is implemented. Also, in PowerShell, 7.0, re-imported, the commands Out-Printer, Get-HotFix and Clear-RecycleBin it only works on Windows.

The strong convergence of the command within PowerShell to 7.0 with Windows PowerShell to 5.1-it’s based on, primarily, to the fact that the majority of the Windows, provided PowerShell extension module to 7.0 that is running in PowerShell, it is able to do so. The Windows-specific module directories C:Program FilesCommon Files WindowsPowerShellModules and C:Windowssystem32WindowsPowerShellv1.0Modules so, in the PowerShell 7.0 to the default search path for modules. Non-PowerShell-7.0-compatible modules that it finds in the Windows 10, 1809, and Windows Server 2019, in mind, as they have in the property. “CompatiblePSEditions” is not the “Core”of the input.

The property CompatiblePSEditions with a PowerShell by 7-compatible and non-compatible with the PowerShell module

When you try to load, they are not compatible with the modules that Import modules in PowerShell to 7.0, then it comes up with an error message, a warning is displayed. This means that in the PowerShell the 7, establishes a remoting connection to an instance of Windows PowerShell that the command is executed. This is the so-called Microsoft “WinPSCompatSession,” and it is based on the module “Windows compatibility”; that is, of course, only on Windows, not on Linux and macOS, because there is no Windows Shell.

On Linux and macOS x, all of the PowerShell modules that are not part of the core of the PowerShell, but the Windows are missing. So, you’re going to find on Linux and mac os only, for the 270 commands at the time of the 1507 prompt in Windows 10.

The number of the new features in PowerShell 7.0 for Windows PowerShell, and for 5.1, it’s manageable. The main improvement is the introduction of a Pipeline that is the concatenation of the operators, & & and ||, which are the classic Shells, it is well-known. In the past, you can connect the PowerShell to the individual commands with the Pipe Symbol | to a Pipeline. Now the user can connect to the Pipeline in which the Pipeline is &&, in the case of a success, and in the Pipeline in the event of a run-time error.

From the C# programming language, Microsoft has a Null Assignment Operator ??, the Null-Coalescing Operator??? = , and the Null-Conditional Operator ?. in the language of the PowerShell script is run. The latter Operator, but it is considered to be an experimental Feature, the user must first enable (refer to Get-ExperimentalFeature and Enable-ExperimentalFeature). You can do this in a loop ForEach-Object -Parallel in a number of Threads to run.

In the case of an error, PowerShell can 7 now features a significantly more detailed and a more concise edition (Concise View). A list of the last bugs in a new Form, you will receive Get-Error. The built-in Variable $error but it still works. In addition to this, the output of the Commandlets Format-Hex and Select-String Microsoft has also improved. In the case of a Select-String now that the references in the output are highlighted. When you enter the following in 7.0 provides support for the user with suggestions on how the content of a variable, if you are not well-known, so the following values are possible (e.g. however, or, for the Note [ValidateSet]).

In addition to this, there are a lot of small enhancements such as new Parameter -countthe user Commandlet Get-Random you can specify that it wants to be, not only one, but several random numbers. The Command Get-Member provides COM objects, not only on the type of data, but it is also the name of a Parameter of the method. It helps a lot to understand how to call the method.

With the following the 7.0 on the Microsoft’s outstanding Support, for the support of the underlying security .USE the Core Version. This means that the PowerShell to 7.0 how to .The NET Core-3.1 a 3. In December, in the year 2022, is not supported. More details can be found in the full list of all the PowerShell and 7.0 on supported versions of the operating system. Support for Version 6.0 and 6.1 is now completed. The 6.2 is going to wait for Microsoft for a period of six months.

In accordance with the current state of the PowerShell 7.0 is shipped with no operating system Standard. The user can refer to the following to 7.0 from the Release page on GitHub. On Windows, Microsoft wants to provide a permanent Windows PowerShell to 5.1. Is it possible for PowerShell to 7.0, or a successor in title is added, at some point, as a second-best Option. The modern to PowerShell and the classic Windows PowerShell, you can also co-exist in a System, because they have a different name for the app (powershell.exe v. pwsh.exe).

More information can be found on the Blog of the announcement. The next Version number to 7.1 for the wear. The Itinerary is yet to come.
(Holger Schwichtenberg) /