Home / Definitions / Cmdlet

Cmdlet

Forrest Stroud
Last Updated May 24, 2021 7:38 am

cmdlets are Microsoft .NET programs designed to interact with Microsoft’s PowerShell automation platform and scripting language. System administrators frequently use PowerShell cmdlets to automate and simplify routine administration tasks across local and remote Windows-based systems.

Pronounced command-let, a cmdlet serves as a lightweight Windows PowerShell script designed to perform a single function. These functions can include actions such as starting and stopping services, managing event logs and events and retrieving data using WMI.

Basic Windows PowerShell cmdlets

Some basic PowerShell cmdlets include Get-Command for searching for specific cmdlets, Get-Help for providing information on how to use specific cmdlets as well as syntax parameters for the cmdlets, Get-Member for obtaining information about the objects that a cmdlet returns, Get-Location and Set-Location for getting and changing the current directory, and Move-Item and Rename-Item for moving and renaming files.

Unlike commands in other command-shell environments, cmdlets are not stand-alone executables and are instead instances of .NET Framework classes. They are also record-oriented because they process a single object at a time, and they process input objects from the pipeline rather than from streams of text, while delivering objects in most cases as output to the pipeline.