When Windows PowerShell 3.0 was released as part of Windows 8, Server 2008 R2, and WMF 3.0, Windows PowerShell moved to a newer version of the .NET Framework (CLR4) that was not compatible older applications. In order to maintain backwards compatibility with these older applications, we kept Windows PowerShell 2.0 as an optional, side-by-side component in later versions of Windows and Windows Server. You could take advantage of this optional component by using powershell -version 2 to start the older version of the engine, or by continuing to use a PowerShell assembly in a .NET CLR2 application. Note: specifying any version higher than 2 with -version (e.g. 3, 4, or 5) will load the latest, non-2.0 version of Windows PowerShell on the machine, regardless of the number specified.
If not, you should instead check for the existence of the file %systemroot%\system32\WindowsPowerShell\v1.0\powershell.exe. If your installer absolutely requires a registry-based validations, you should first check for HKLM:\Software\Microsoft\PowerShell\3\PowerShellEngine (note the 3) before falling back to HKLM:\Software\Microsoft\PowerShell\1\PowerShellEngine.
PowerShell originated as a proprietary offering that was only available on Windows. Today, PowerShell is available by default on most recent Windows systems; simply type "powershell" into the Windows search bar to locate the PowerShell app. In 2016, Microsoft open sourced PowerShell and made it available on Linux and macOS.
PowerShell Integrated Scripting Environment (ISE), introduced by Microsoft in PowerShell version 2.0, is a PowerShell host application used to write, test and debug scripts or write commands in a Windows GUI. To access the ISE, click Start, select Windows PowerShell and choose Windows PowerShell ISE. As an alternative, simply type powershell_ise.exe in the command shell or Windows Run box.
Any computer running Windows 10 or later already has PowerShell installed by default. PowerShell can be invoked simply by typing "powershell" into the Search bar and selecting the PowerShell app from the resulting search list. Similarly, PowerShell can be invoked by entering powershell.exe in the Run dialog.
Der PowerShell Host ist die Benutzerschnittstelle zur PowerShell Engine. In Windows steht standardmäßig die Windows PowerShell (auch Konsole) (powershell.exe, bereitgestellt durch conhost.exe) und Windows PowerShell ISE (Integrated Scripting Environment, kurz ISE) (powershell_ise.exe) zur Verfügung. Die ISE ist ein modernes Eingabefenster mit unter anderem integriertem Skripteditor, Debugger und IntelliSense. Beide Hosts erlauben es auch, herkömmliche Kommandozeilenanwendungen auszuführen, wie beispielsweise ipconfig.exe. Jedoch erlaubt die ISE keine Interaktion, wie zum Beispiel bei nslookup.exe. Die ISE kann durch Add-ons erweitert werden; eine bekannte Erweiterung ist ISESteroids.Auch Verwaltungskonsolen, wie etwa die Exchange Management Console (EMC) seit Exchange Server 2007, sind ein Host. Darüber hinaus gibt es auf dem Markt weitere Hosts, wie PowerShell Plus von Idera.Zwar nutzen alle Hosts dieselbe Engine, doch da die Implementierung unterschiedlich sein kann, ist es auch möglich, dass sich die Hosts untereinander unterschiedlich verhalten.
Der Kommandozeilenname von PowerShell 6 wurde von powershell.exe in pwsh.exe umbenannt, dies erlaubt eine leichtere Unterscheidung beim Aufruf der Powershell, wenn sowohl PowerShell Core, als auch die klassische Powershell installiert sind.[40]
df19127ead