PowerShell

PowerShell
Screenshot of a PowerShell 7 session in Windows Terminal
ParadigmImperative, pipeline, object-oriented, functional and reflective
Designed byJeffrey Snover, Bruce Payette, James Truher (et al.)
DeveloperMicrosoft
First appearedNovember 14, 2006 (2006-11-14)
Stable release
7.4.1 / January 11, 2024 (2024-01-11)[1]
Typing disciplineStrong, safe, implicit and dynamic
Implementation languageC#
PlatformPowerShell: .NET
Windows PowerShell: .NET Framework
OS
LicenseMIT License[2] (but the Windows component remains proprietary)
Filename extensions
  • .ps1 (Script)
  • .ps1xml (XML Document)
  • .psc1 (Console File)
  • .psd1 (Data File)
  • .psm1 (Script Module)
  • .pssc (Session Configuration File)
  • .psrc (Role Capability File)
  • .cdxml (Cmdlet Definition XML Document)
Websitemicrosoft.com/powershell
Influenced by
Python, Ksh, Perl, C#, CL, DCL, SQL, Tcl, Tk,[3] Chef, Puppet

PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-source and cross-platform on August 18, 2016, with the introduction of PowerShell Core.[4] The former is built on the .NET Framework, the latter on .NET (previously .NET Core).

PowerShell is bundled with all currently supported Windows versions, and can also be installed on MacOS and Linux.[4] Since Windows 10 build 14971, PowerShell replaced Command Prompt (cmd.exe) and became the default command shell for File Explorer.[5][6]

In PowerShell, administrative tasks are generally performed via cmdlets (pronounced command-lets), which are specialized .NET classes implementing a particular operation. These work by accessing data in different data stores, like the file system or Windows Registry, which are made available to PowerShell via providers. Third-party developers can add cmdlets and providers to PowerShell.[7][8] Cmdlets may be used by scripts, which may in turn be packaged into modules. Cmdlets work in tandem with the .NET API.

PowerShell's support for .NET Remoting, WS-Management, CIM, and SSH enables administrators to perform administrative tasks on both local and remote Windows systems. PowerShell also provides a hosting API with which the PowerShell runtime can be embedded inside other applications. These applications can then use PowerShell functionality to implement certain operations, including those exposed via the graphical interface. This capability has been used by Microsoft Exchange Server 2007 to expose its management functionality as PowerShell cmdlets and providers and implement the graphical management tools as PowerShell hosts which invoke the necessary cmdlets.[7][9] Other Microsoft applications including Microsoft SQL Server 2008 also expose their management interface via PowerShell cmdlets.[10]

PowerShell includes its own extensive, console-based help (similar to man pages in Unix shells) accessible via the Get-Help cmdlet. Updated local help contents can be retrieved from the Internet via the Update-Help cmdlet. Alternatively, help from the web can be acquired on a case-by-case basis via the -online switch to Get-Help.

  1. ^ "Release v7.4.1 Release of PowerShell · PowerShell/PowerShell". PowerShell/PowerShell repo. Microsoft. Retrieved January 11, 2024 – via GitHub.com.
  2. ^ "PowerShell for every system!". June 12, 2017 – via GitHub.com.
  3. ^ Snover, Jeffrey (May 25, 2008). "PowerShell and WPF: WTF". Windows PowerShell Blog. Microsoft.
  4. ^ a b Cite error: The named reference ars-opensource was invoked but never defined (see the help page).
  5. ^ "Announcing Windows 10 Insider Preview Build 14971 for PC".
  6. ^ "PowerShell is replacing Command Prompt".
  7. ^ a b Cite error: The named reference how was invoked but never defined (see the help page).
  8. ^ Truher, Jim (December 2007). "Extend Windows PowerShell With Custom Commands". MSDN Magazine. Microsoft. Archived from the original on October 6, 2008.
  9. ^ Lowe, Scott (January 4, 2007). "Exchange 2007: Get used to the command line". TechRepublic. CBS Interactive. Archived from the original on November 16, 2018. Retrieved May 12, 2020.
  10. ^ Snover, Jeffrey (November 13, 2007). "SQL Server Support for PowerShell!". Windows PowerShell Blog (blog posting). Microsoft. Archived from the original on November 15, 2007. Retrieved November 13, 2007.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search