powershell_reserved_words_-_powershell_keywords

PowerShell Reserved Words - PowerShell Keywords

Return to PowerShell Glossary, Reserved Words, PowerShell, PowerShell Libraries, PowerShell Syntax, PowerShell Data Structures, PowerShell Algorithms, PowerShell Development Tools, PowerShell DevOps - PowerShell SRE - PowerShell CI/CD, Cloud Native PowerShell - PowerShell Microservices - Serverless PowerShell, PowerShell Security - PowerShell DevSecOps, Functional PowerShell, PowerShell Concurrency, PowerShell Data Science - PowerShell and Databases, PowerShell Machine Learning, Awesome PowerShell

Also called: PowerShell Language Keywords, PowerShell Reserved Keywords, PowerShell Keywords, PowerShell Reserved Identifiers, PowerShell Reserved words


Provide a list of Reserved Words in PowerShell. Answer in MediaWiki syntax with the URL of the official documentation for each language reference.

PowerShell, being a versatile scripting and automation platform, utilizes a set of reserved words or keywords that have special meanings within its environment. These keywords cannot be used as identifiers (like variable or function names) because they are part of the PowerShell syntax. Below is a list of common reserved words for PowerShell. The list includes a link to the official PowerShell documentation for further reference.

PowerShell Reserved Words

Below is a list of reserved words in PowerShell. These keywords are integral to PowerShell's scripting language and have specific functions and meanings.

  • Begin - Used in a script block to define a section that provides preparatory tasks before the main processing begins.
  • Break - Exits a loop or a switch statement.
  • Catch - Handles exceptions caught by a Try block.
  • Class - Defines a class.
  • Continue - Skips the current iteration of a loop and moves to the next iteration.
  • Data - Defines a data section for declarative language elements.
  • Do - Used for a loop that executes as long as or until a specified condition is true.
  • DynamicParam - Defines dynamic parameters.
  • Else - Specifies a block of commands to run when an If statement does not evaluate to true.
  • ElseIf - Defines an additional condition in an If statement.
  • End - Used in a script block to define a section that runs after the main processing is completed.
  • Exit - Exits PowerShell or a script.
  • Filter - Defines a function that processes input from the pipeline.
  • Finally - Defines a block of commands that always runs after Try and Catch blocks.
  • For - Specifies a loop that runs a specified number of times.
  • Foreach - Loops through each item in a collection.
  • Function - Defines a script block that can be reused.
  • If - Specifies a condition for running a block of commands.
  • In - Used as part of a Foreach loop.
  • Inlinescript - Defines a script block that runs in a separate, non-parallel session.
  • Interface - Defines an interface.
  • Param - Defines parameters for a script or function.
  • Process - Used in a function to process input from the pipeline.
  • Return - Exits a script or function, optionally returning a value.
  • Switch - Specifies a conditional statement with multiple conditions.
  • Throw - Generates a terminating error.
  • Trap - Specifies a block of commands to run when an error occurs.
  • Try - Specifies a block of commands for which errors will be caught in a Catch block.
  • Until - Used in a loop to specify that the loop runs until the condition is true.
  • Using - Imports types from modules or namespaces, or imports modules.
  • Var - Declares a variable in a class.
  • While - Specifies a condition for running a block of commands.

For more details on each reserved word and how they are used in PowerShell, refer to the Official PowerShell Documentation.

This list offers a glimpse into the PowerShell scripting language's syntax and structure, highlighting keywords that play a pivotal role in script development and execution. PowerShell's official documentation is a comprehensive resource for learning more about these reserved words and their usage in various scripting scenarios.


Snippet from Wikipedia: PowerShell

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. 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. Since Windows 10 build 14971, PowerShell replaced Command Prompt (cmd.exe) and became the default command shell for File Explorer.

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. 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. Other Microsoft applications including Microsoft SQL Server 2008 also expose their management interface via PowerShell cmdlets.

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.

Research More

PowerShell on the Cloud

PowerShell on Containers

PowerShell Courses

Fair Use Source

PowerShell Programming Language, PowerShell Shell, PowerShell Script, PowerShell .ps1 File, PowerShell Pipeline, PowerShell PowerShell.exe Executable, PowerShell pwsh Executable, PowerShell Core, PowerShell ISE (Integrated Scripting Environment), PowerShell Module, PowerShell Cmdlet, PowerShell Get-Command Cmdlet, PowerShell Get-Help Cmdlet, PowerShell Get-Process Cmdlet, PowerShell Get-Service Cmdlet, PowerShell Get-Item Cmdlet, PowerShell Set-Item Cmdlet, PowerShell Remove-Item Cmdlet, PowerShell Get-Content Cmdlet, PowerShell Set-Content Cmdlet, PowerShell Add-Content Cmdlet, PowerShell Out-Host Cmdlet, PowerShell Out-File Cmdlet, PowerShell Out-Null Cmdlet, PowerShell Out-GridView Cmdlet, PowerShell Select-Object Cmdlet, PowerShell Where-Object Cmdlet, PowerShell ForEach-Object Cmdlet, PowerShell Sort-Object Cmdlet, PowerShell Measure-Object Cmdlet, PowerShell Group-Object Cmdlet, PowerShell Format-Table Cmdlet, PowerShell Format-List Cmdlet, PowerShell Format-Wide Cmdlet, PowerShell Format-Custom Cmdlet, PowerShell Compare-Object Cmdlet, PowerShell Tee-Object Cmdlet, PowerShell New-Item Cmdlet, PowerShell Copy-Item Cmdlet, PowerShell Move-Item Cmdlet, PowerShell Rename-Item Cmdlet, PowerShell Test-Path Cmdlet, PowerShell Join-Path Cmdlet, PowerShell Split-Path Cmdlet, PowerShell Resolve-Path Cmdlet, PowerShell Push-Location Cmdlet, PowerShell Pop-Location Cmdlet, PowerShell Set-Location Cmdlet, PowerShell Get-ChildItem Cmdlet, PowerShell Invoke-Item Cmdlet, PowerShell Clear-Host Cmdlet, PowerShell Clear-Content Cmdlet, PowerShell Get-Date Cmdlet, PowerShell Get-Variable Cmdlet, PowerShell Set-Variable Cmdlet, PowerShell New-Variable Cmdlet, PowerShell Remove-Variable Cmdlet, PowerShell New-Alias Cmdlet, PowerShell Get-Alias Cmdlet, PowerShell Set-Alias Cmdlet, PowerShell Import-Module Cmdlet, PowerShell Get-Module Cmdlet, PowerShell Remove-Module Cmdlet, PowerShell Export-ModuleMember Cmdlet, PowerShell Update-Help Cmdlet, PowerShell Save-Help Cmdlet, PowerShell Set-ExecutionPolicy Cmdlet, PowerShell Get-ExecutionPolicy Cmdlet, PowerShell Invoke-Command Cmdlet, PowerShell Enter-PSSession Cmdlet, PowerShell Exit-PSSession Cmdlet, PowerShell New-PSSession Cmdlet, PowerShell Remove-PSSession Cmdlet, PowerShell Import-PSSession Cmdlet, PowerShell Export-PSSession Cmdlet, PowerShell New-PSSessionOption Cmdlet, PowerShell Enable-PSRemoting Cmdlet, PowerShell Disable-PSRemoting Cmdlet, PowerShell Set-StrictMode Cmdlet, PowerShell Get-PSProvider Cmdlet, PowerShell Get-PSDrive Cmdlet, PowerShell New-PSDrive Cmdlet, PowerShell Remove-PSDrive Cmdlet, PowerShell Set-PSBreakpoint Cmdlet, PowerShell Remove-PSBreakpoint Cmdlet, PowerShell Get-PSBreakpoint Cmdlet, PowerShell Start-Job Cmdlet, PowerShell Get-Job Cmdlet, PowerShell Stop-Job Cmdlet, PowerShell Receive-Job Cmdlet, PowerShell Remove-Job Cmdlet, PowerShell Wait-Job Cmdlet, PowerShell Start-Process Cmdlet, PowerShell Stop-Process Cmdlet, PowerShell Wait-Process Cmdlet, PowerShell New-Object Cmdlet, PowerShell Select-String Cmdlet, PowerShell Invoke-Expression Cmdlet, PowerShell Write-Host Cmdlet, PowerShell Write-Output Cmdlet, PowerShell Write-Error Cmdlet, PowerShell Write-Warning Cmdlet, PowerShell Write-Verbose Cmdlet, PowerShell Write-Debug Cmdlet, PowerShell Write-Information Cmdlet, PowerShell Get-Credential Cmdlet, PowerShell ConvertTo-SecureString Cmdlet, PowerShell ConvertFrom-SecureString Cmdlet, PowerShell Read-Host Cmdlet, PowerShell Get-Random Cmdlet, PowerShell New-TemporaryFile Cmdlet, PowerShell Start-Transcript Cmdlet, PowerShell Stop-Transcript Cmdlet, PowerShell Show-Command Cmdlet, PowerShell Add-Type Cmdlet, PowerShell Invoke-RestMethod Cmdlet, PowerShell Invoke-WebRequest Cmdlet, PowerShell Out-String Cmdlet, PowerShell Out-Printer Cmdlet, PowerShell Out-Default Cmdlet, PowerShell Out-Clipboard Cmdlet, PowerShell Get-Clipboard Cmdlet, PowerShell Set-Clipboard Cmdlet, PowerShell Start-Sleep Cmdlet, PowerShell Start-BitsTransfer Cmdlet, PowerShell ConvertTo-Json Cmdlet, PowerShell ConvertFrom-Json Cmdlet, PowerShell ConvertTo-Xml Cmdlet, PowerShell ConvertFrom-StringData Cmdlet, PowerShell ConvertTo-CSV Cmdlet, PowerShell ConvertFrom-CSV Cmdlet, PowerShell Import-CSV Cmdlet, PowerShell Export-CSV Cmdlet, PowerShell Import-Clixml Cmdlet, PowerShell Export-Clixml Cmdlet, PowerShell ConvertFrom-Markdown Cmdlet, PowerShell Get-InstalledModule Cmdlet, PowerShell Install-Module Cmdlet, PowerShell Update-Module Cmdlet, PowerShell Uninstall-Module Cmdlet, PowerShell Find-Module Cmdlet, PowerShell Save-Module Cmdlet, PowerShell Test-ModuleManifest Cmdlet, PowerShell Publish-Module Cmdlet, PowerShell Register-PSRepository Cmdlet, PowerShell Unregister-PSRepository Cmdlet, PowerShell Set-PSRepository Cmdlet, PowerShell Get-PSRepository Cmdlet, PowerShell Install-Package Cmdlet, PowerShell Get-Package Cmdlet, PowerShell Uninstall-Package Cmdlet, PowerShell Save-Package Cmdlet, PowerShell Find-Package Cmdlet, PowerShell Register-PackageSource Cmdlet, PowerShell Unregister-PackageSource Cmdlet, PowerShell Set-PackageSource Cmdlet, PowerShell Get-PackageSource Cmdlet, PowerShell Trace-Command Cmdlet, PowerShell Set-PSDebug Cmdlet, PowerShell Register-ScheduledJob Cmdlet, PowerShell Unregister-ScheduledJob Cmdlet, PowerShell Get-ScheduledJob Cmdlet, PowerShell Disable-ScheduledJob Cmdlet, PowerShell Enable-ScheduledJob Cmdlet, PowerShell Set-ScheduledJob Cmdlet, PowerShell Start-Job -InitializationScript Parameter, PowerShell Foreach-Object -Parallel Feature, PowerShell New-PSRoleCapabilityFile Cmdlet, PowerShell Suspend-Job Cmdlet, PowerShell Resume-Job Cmdlet, PowerShell Start-ThreadJob Cmdlet, PowerShell Get-ThreadJob Cmdlet, PowerShell New-Guid Cmdlet, PowerShell Get-PSCallStack Cmdlet, PowerShell Add-History Cmdlet, PowerShell Get-History Cmdlet, PowerShell Invoke-History Cmdlet, PowerShell Clear-History Cmdlet, PowerShell Set-PSReadlineKeyHandler Cmdlet, PowerShell Get-PSReadlineKeyHandler Cmdlet, PowerShell Remove-PSReadlineKeyHandler Cmdlet, PowerShell Set-PSReadlineOption Cmdlet, PowerShell Get-PSReadlineOption Cmdlet, PowerShell Format-Hex Cmdlet, PowerShell ConvertFrom-String Cmdlet, PowerShell ConvertTo-Html Cmdlet, PowerShell Select-XML Cmdlet, PowerShell Test-Json Cmdlet, PowerShell Get-TypeData Cmdlet, PowerShell Update-TypeData Cmdlet, PowerShell Remove-TypeData Cmdlet, PowerShell Register-ObjectEvent Cmdlet, PowerShell Register-WmiEvent Cmdlet, PowerShell Register-EngineEvent Cmdlet, PowerShell Unregister-Event Cmdlet, PowerShell Get-EventSubscriber Cmdlet, PowerShell Remove-Event Cmdlet, PowerShell Get-Event Cmdlet, PowerShell Wait-Event Cmdlet, PowerShell New-Event Cmdlet, PowerShell Send-MailMessage Cmdlet, PowerShell Test-Connection Cmdlet, PowerShell Get-WmiObject Cmdlet, PowerShell Get-CimInstance Cmdlet, PowerShell New-CimInstance Cmdlet, PowerShell Remove-CimInstance Cmdlet, PowerShell Set-CimInstance Cmdlet, PowerShell Invoke-CimMethod Cmdlet, PowerShell Import-Counter Cmdlet, PowerShell Export-Counter Cmdlet, PowerShell Get-Counter Cmdlet, PowerShell Add-Computer Cmdlet, PowerShell Rename-Computer Cmdlet, PowerShell Restart-Computer Cmdlet, PowerShell Stop-Computer Cmdlet, PowerShell Test-ComputerSecureChannel Cmdlet, PowerShell Reset-ComputerMachinePassword Cmdlet,

PowerShell: Effective PowerShell, PowerShell Standard Library, PowerShell Fundamentals - PowerShell Basic Commands, PowerShell Inventor - PowerShell Language Designer: Jeffrey Snover, Bruce Payette, James Truher (et al.) of Microsoft on November 14, 2006; PowerShell DevOps - PowerShell SRE, PowerShell in the Cloud (Azure PowerShell - AWS PowerShell - GCP PowerShell - VMware PowerShell), PowerShell Core, Windows PowerShell, Windows Server PowerShell, Linux PowerShell (PowerShell on Ubuntu, PowerShell on Debian, PowerShell on RHEL, PowerShell on Fedora - brew install powershell), macOS PowerShell - brew install powershell, Cloud Native PowerShell - PowerShell on Kubernetes - PowerShell on AWS - PowerShell on Azure - PowerShell on GCP), PowerShell Microservices, PowerShell Containerization (PowerShell Docker - PowerShell on Docker Hub), Serverless PowerShell, PowerShell Data Science - PowerShell DataOps - PowerShell and Databases (PowerShell ORM), PowerShell ML - PowerShell DL, Functional PowerShell (1. PowerShell Immutability, 2. PowerShell Purity - PowerShell No Side-Effects, 3. PowerShell First-Class Functions - PowerShell Higher-Order Functions, PowerShell Lambdas - PowerShell Anonymous Functions - PowerShell Closures, PowerShell Lazy Evaluation, 4. PowerShell Recursion), Reactive PowerShell), PowerShell Concurrency - PowerShell Parallel Programming - Async PowerShell, PowerShell Networking, PowerShell Security - PowerShell DevSecOps - PowerShell OAuth, PowerShell Memory Allocation (PowerShell Heap - PowerShell Stack - PowerShell Garbage Collection), PowerShell CI/CD - PowerShell Dependency Management - PowerShell DI - PowerShell IoC - PowerShell Build Pipeline, PowerShell Automation - PowerShell Scripting, PowerShell Package Managers, PowerShell Modules - PowerShell Packages, PowerShell Installation (PowerShell Windows - Chocolatey PowerShell (choco search powershell, choco install powershell-core), PowerShell macOS - Homebrew PowerShell, PowerShell on Linux), PowerShell Configuration, PowerShell Observability (PowerShell Monitoring, PowerShell Performance - PowerShell Logging), PowerShell Language Spec - PowerShell RFCs - PowerShell Roadmap, PowerShell Keywords, PowerShell Data Structures - PowerShell Algorithms, PowerShell Syntax, PowerShell OOP (1. PowerShell Encapsulation - 2. PowerShell Inheritance - 3. PowerShell Polymorphism - 4. PowerShell Abstraction), PowerShell Design Patterns - PowerShell Best Practices - PowerShell Style Guide - Clean PowerShell - PowerShell BDD, PowerShell Generics, PowerShell I/O, PowerShell Serialization - PowerShell Deserialization, PowerShell APIs, PowerShell REST - PowerShell JSON - PowerShell GraphQL, PowerShell gRPC, PowerShell Virtualization, PowerShell Development Tools: PowerShell SDK, PowerShell Compiler - PowerShell Transpiler, PowerShell Interpreter - PowerShell REPL, PowerShell IDEs (JetBrains PowerShell, PowerShell Visual Studio Code), PowerShell Linter, PowerShell Community - PowerShellaceans - PowerShell User, PowerShell Standard Library - PowerShell Libraries - PowerShell Frameworks, PowerShell Testing - PowerShell TDD, PowerShell History, PowerShell Versions, PowerShell Research, PowerShell Topics, PowerShell Uses - List of PowerShell Software - Written in PowerShell - PowerShell Popularity, PowerShell Bibliography - Manning PowerShell Series - PowerShell Courses, PowerShell Glossary - PowerShell Official Glossary, PowerShell GitHub, Awesome PowerShell, PowerShell Versions. (navbar_powershell)

Reserved Words: Programming Language Keywords, aka Reserved Identifiers. (navbar_reserved_words - see also navbar_programming)


Cloud Monk is Retired ( for now). Buddha with you. © 2025 and Beginningless Time - Present Moment - Three Times: The Buddhas or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


powershell_reserved_words_-_powershell_keywords.txt · Last modified: 2025/02/01 06:35 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki