cmdlet(常见于 Microsoft PowerShell)指一种“命令小程序/命令单元”:用于执行特定管理或自动化任务的轻量级命令,通常采用“动词-名词”形式(如 Get-Process、Set-Item),并能在管道(pipeline)中传递对象。
/ˈkɑːm.dlət/
I ran a cmdlet to list all running processes.
我运行了一个 cmdlet 来列出所有正在运行的进程。
After importing the module, the cmdlet can be piped into another one to filter results and export them to a file.
导入模块后,这个 cmdlet 可以通过管道传给另一个命令,用于筛选结果并导出到文件。
cmdlet 是 commandlet 的缩写,构词来自 command(命令)+ -let(“小……”的后缀,表示较小的事物)。该词在 PowerShell 生态中被系统化使用,用来强调它们是可组合、可管道连接的“命令组件”,而不仅仅是简单的文本命令。