- PowerShell 教程
- PowerShell - 主頁
- PowerShell - 概述
- PowerShell - 環境設定
- PowerShell - Cmdlet
- PowerShell - 檔案和資料夾
- PowerShell - 日期和時間
- PowerShell - 檔案 I/O
- PowerShell - 高階 Cmdlet
- PowerShell - 指令碼編寫
- PowerShell - 特殊變數
- PowerShell - 運算子
- PowerShell - 迴圈
- PowerShell - 條件
- PowerShell - 陣列
- PowerShell - 雜湊表
- PowerShell - 正則表示式
- PowerShell - 反引號
- PowerShell - 中括號
- PowerShell - 別名
- PowerShell 實用資源
- PowerShell - 快速指南
- PowerShell - 實用資源
- PowerShell - 討論
Powershell - Cmdlet
Cmdlet 或“命令小指令”是 Windows PowerShell 環境中使用的輕量級命令。Windows PowerShell 執行時在命令提示符處呼叫這些 Cmdlet。你可以透過 Windows PowerShell API 以程式設計方式建立和呼叫它們。
Cmdlet 與命令
Cmdlet 與其他命令外殼環境中的命令在以下方面大不相同 -
Cmdlet 是 .NET Framework 類物件;而不僅僅是獨立的可執行檔案。
Cmdlet 可以很容易地從少則幾行程式碼構建。
解析、錯誤呈現和輸出格式化不是由 Cmdlet 處理的。而是由 Windows PowerShell 執行時處理。
Cmdlet 處理的是物件,而不是文字流,並且可以將物件傳遞為管道輸出。
Cmdlet 是基於記錄的,因為它們一次處理一個物件。
獲取幫助
第一步是轉到 Get-Help 命令,該命令會解釋如何提供命令及其引數。
廣告