当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 什么是 PowerShell 命令?

作者:精品下载站 日期:2024-12-14 03:07:09 浏览:12 分类:玩电脑

什么是 PowerShell 命令?


PowerShell 命令称为 cmdlet(发音为 command-let)。除了 cmdlet 之外,PowerShell 还允许您运行系统上可用的任何命令。

什么是 cmdlet?

Cmdlet 是本机 PowerShell 命令,而不是独立的可执行文件。 Cmdlet 被收集到可按需加载的 PowerShell 模块中。 Cmdlet 可以使用任何已编译的 .NET 语言或 PowerShell 脚本语言本身编写。

Cmdlet 名称

PowerShell 使用动词-名词名称对来命名 cmdlet。例如,PowerShell 中包含的 Get-Command cmdlet 用于获取在命令 shell 中注册的所有 cmdlet。动词标识 cmdlet 执行的操作,名词标识 cmdlet 执行其操作的资源。

后续步骤

要了解有关 PowerShell 以及如何查找其他 cmdlet 的更多信息,请参阅 PowerShell Bits 教程发现 PowerShell。

有关创建您自己的 cmdlet 的详细信息,请参阅以下资源:

基于脚本的 cmdlet

  • about_功能_高级
  • about_Functions_CmdletBindingAttribute
  • about_Functions_Advanced_Methods

编译的 cmdlet(PowerShell SDK 文档)

  • Cmdlet 概述

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯