PowerShell
termprogrammingops culturesecurity
Kept in this browser · My desk
Microsoft's cross-platform task automation solution, a command-line shell, scripting language and configuration management framework whose commands accept and return .NET objects rather than text.
Windows PowerShell 1.0 shipped in November 2006; on 23 November 2026 the current releases were PowerShell 7.5.11 (stable) and 7.6.6 (long-term servicing).
What it is. PowerShell is Microsoft's cross-platform task automation solution: a command-line shell, a scripting language and a configuration management framework, Desired State Configuration (DSC), that runs on Windows, Linux and macOS. Where most shells accept and return text, PowerShell accepts and returns .NET objects: it is built on the .NET Common Language Runtime (CLR), so every input and output is an object.
How it works. A pipeline is a series of commands joined by the pipeline operator, the vertical bar, character 124 of the American Standard Code for Information Interchange (ASCII), and each command sends its results to the next one. Because the pipeline carries objects, PowerShell needs no text parsing between commands: the receiving command binds what arrives to its parameters either by the object's type (ByValue) or by matching property names (ByPropertyName), and processes the objects one at a time. Commands are cmdlets such as Start-Process and Invoke-Command, with aliases, tab completion and command prediction in the shell; built-in support for comma-separated values (CSV), JavaScript Object Notation (JSON) and Extensible Markup Language (XML) data; and remoting, including over SSH (Secure Shell). PowerShell runs on the .NET runtime, and each PowerShell 7 release is tied to a .NET release.
History. The project began inside Microsoft as Monad; in the account Microsoft published when it opened the code, an executive of a large customer who wanted to standardize his company on Monad objected that it was written in C#, because .NET, and so PowerShell, then ran only on Windows. Windows PowerShell 1.0 shipped in November 2006 as an optional component of Windows Server 2008, followed by 2.0 (July 2009, Windows 7), 3.0 (October 2012), 4.0 (October 2013), 5.0 (February 2016, in the Windows Management Framework) and 5.1 (August 2016, Windows 10 Anniversary Update and Windows Server 2016), the last Windows PowerShell; Microsoft no longer supports versions below 5.1. On 18 August 2016 Microsoft open-sourced PowerShell and released alpha builds for Ubuntu, CentOS, Red Hat and Mac OS X, made possible by the port of .NET Core to Linux. PowerShell 6.0 followed on 20 January 2018 on .NET Core 2.0, and PowerShell 7.0, a long-term servicing (LTS) release, on 4 March 2020.
Lifecycle. Microsoft's lifecycle page says an LTS release of PowerShell is an LTS release of .NET. It lists PowerShell 7.4 (LTS, 16 November 2023, .NET 8.0), 7.5 (23 January 2025, .NET 9.0) and 7.6 (LTS, 18 March 2026, .NET 10.0, supported until 14 November 2028), with 7.7 in preview on .NET 11.0; on 23 November 2026 the current releases were PowerShell 7.5.11 (stable) and 7.6.6 (long-term servicing), while the same page gave 10 November 2026 as the end of support of 7.4 and 7.5. Windows PowerShell 5.1 is supported through Windows support channels.
Why attackers use it. MITRE ATT&CK (Adversarial Tactics, Techniques and Common Knowledge) catalogues it as technique T1059.001, Command and Scripting Interpreter: PowerShell (version 1.6, last modified 18 September 2026): adversaries use it for discovery and to execute code, with cmdlets such as Start-Process and Invoke-Command, which runs commands locally or on a remote computer given administrator rights; to download and run executables from the Internet, on disk or only in memory; and even without powershell.exe, by loading its underlying System.Management.Automation library. ATT&CK names offensive frameworks written in PowerShell, Empire, PowerSploit, PoshC2 and PSAttack, and groups such as APT28 among its users. Because it ships with Windows, it is the kind of built-in tool the glossary files under living-off-the-land.
What defenders can do. Microsoft's own documentation draws the lines. The execution policy is a safety feature that controls when configuration files and scripts load, but it "isn't a security boundary": a user can bypass it by typing a script's contents at the prompt. The Default policy is RemoteSigned for Windows clients and servers, and on other systems the policy is Unrestricted and behaves like Bypass. Visibility grew with PowerShell 5, which a June 2015 post by the PowerShell team for blue teams described as building on the transcription and module logging of earlier versions: system-wide transcription through Group Policy, deep script block logging, which records the content of every script block processed (event 4104 in the Operational log), automatic logging of script blocks containing content often used by malicious scripts, and Protected Event Logging, recommended because those events can hold sensitive data. The Antimalware Scan Interface (AMSI), introduced with Windows 10, lets PowerShell submit all script content, with additional calls for obfuscated or dynamically evaluated code, to the installed antimalware product; Windows Script Host, JavaScript and VBScript use it too. Language modes limit what a session may do: FullLanguage, RestrictedLanguage, ConstrainedLanguage (introduced in PowerShell 3.0) and NoLanguage; PowerShell switches to ConstrainedLanguage automatically under an AppLocker or Windows Defender Application Control (WDAC) policy, and ATT&CK lists that mode, code signing, antimalware and restricting Windows Remote Management (WinRM) among its mitigations. Just Enough Administration (JEA) builds constrained remoting endpoints. The National Security Agency (NSA) and partner agencies published joint guidance on securing PowerShell in June 2022, Keeping PowerShell: Security Measures to Use and Embrace; its Portable Document Format (PDF) refused the reading tool and is listed among the pages to read in a browser.
Neighbours. Shell and Unix-style command lines, which pass text where PowerShell passes objects; Python, the other general automation language of operations teams; C#, the .NET language PowerShell is written in; programming-language; living-off-the-land and edr, where it meets security work.
Also known as: windows powershell, pwsh, powershell 7
Sources
- Microsoft Learn, What is PowerShell?: a cross-platform task automation solution; a shell that accepts and returns .NET objects; a scripting language (read 2026-11-23)
- Microsoft Learn, PowerShell support lifecycle: Windows PowerShell 1.0 in November 2006; PowerShell 7.5.11 stable and 7.6.6 LTS (read 2026-11-23)
- MITRE ATT&CK, T1059.001 Command and Scripting Interpreter: PowerShell, version 1.6, created 9 March 2020, last modified 18 September 2026 (read 2026-11-23): discovery and execution with Start-Process and Invoke-Command; download and run in memory; use without powershell.exe through System.Management.Automation; Empire, PowerSploit, PoshC2, PSAttack; mitigations M1049, M1045, M1042 and Constrained Language mode
- Microsoft Learn, about_Execution_Policies (read 2026-11-23): a safety feature that isn't a security boundary, bypassed by typing script contents; Default is RemoteSigned for Windows clients and servers; Unrestricted, behaving as Bypass, on non-Windows platforms
- Microsoft Learn, about_Logging_Windows (read 2026-11-23): Script Block Logging records the content of all script blocks processed; event 4104 in the Operational log; Protected Event Logging recommended; enabled by Group Policy or registry
- Microsoft Learn, about_Language_Modes (read 2026-11-23): FullLanguage, RestrictedLanguage, ConstrainedLanguage (introduced in PowerShell 3.0) and NoLanguage; ConstrainedLanguage applied automatically under AppLocker or WDAC policies
- Microsoft Learn, Antimalware Scan Interface (AMSI) (read 2026-11-23): an interface standard letting applications integrate with any antimalware product; integrated in Windows 10 with PowerShell, Windows Script Host, JavaScript and VBScript
- PowerShell Team, PowerShell the Blue Team, 9 June 2015 (read 2026-11-23): PowerShell 5 and Windows 10: system-wide transcription, deep script block logging, automatic logging of suspicious script blocks, Protected Event Logging, AMSI integration; Just Enough Administration endpoints
- Microsoft Azure blog, PowerShell is open sourced and is available on Linux, 18 August 2016 (read 2026-11-23): open source with alpha builds for Ubuntu, CentOS, Red Hat and Mac OS X; enabled by .NET Core on Linux; the Monad-era account of a customer objecting to C#
- Microsoft Learn, about_Pipelines (read 2026-11-23): commands connected by the pipeline operator (ASCII 124), objects sent one at a time, parameter binding ByValue and ByPropertyName