Tại sao lệnh Windows PowerShell được gọi là Cmdlets?

Mục lục:

Tại sao lệnh Windows PowerShell được gọi là Cmdlets?
Tại sao lệnh Windows PowerShell được gọi là Cmdlets?

Video: Tại sao lệnh Windows PowerShell được gọi là Cmdlets?

Video: Tại sao lệnh Windows PowerShell được gọi là Cmdlets?
Video: 8 thủ thuật cho Safari trên iOS 15 chỉ chuyên gia mới biết - YouTube 2024, Có thể
Anonim

Phiên Hỏi & Đáp hôm nay đến với chúng tôi theo lịch sự của SuperUser - một phân khu của Stack Exchange, một nhóm các trang web Hỏi & Đáp do cộng đồng điều hành.

Câu hỏi

Trình đọc siêu người dùng RBT muốn biết tại sao các lệnh Windows PowerShell được gọi là lệnh ghép ngắn:

I have been trying to figure out the nomenclature for why commands are called command-lets (cmdlets) in PowerShell. Why they are not simply called commands instead? What is the difference?

I could only guess based on this Wikipedia article about PowerShell that it might somehow be an abbreviation of the command line interface to interact with commands written in.Net.

Tại sao các lệnh Windows PowerShell được gọi là lệnh ghép ngắn?

Câu trả lời

Người đóng góp của SuperUser LotPings có câu trả lời cho chúng tôi:

According to Microsoft:

A cmdlet is a lightweight command that is used in the Windows PowerShell environment. The Windows PowerShell runtime invokes these cmdlets within the context of automation scripts that are provided at the command line. The Windows PowerShell runtime also invokes them programmatically through Windows PowerShell APIs.

How Cmdlets Differ from Commands

Cmdlets differ from commands in other command-shell environments in the following ways:

  • Cmdlets are instances of.NET Framework classes; they are not stand-alone executables.
  • Cmdlets can be created from as few as a dozen lines of code.
  • Cmdlets do not generally do their own parsing, error presentation, or output formatting. Parsing, error presentation, and output formatting are handled by the Windows PowerShell runtime.
  • Cmdlets process input objects from the pipeline rather than from streams of text, and cmdlets typically deliver objects as output to the pipeline.
  • Cmdlets are record-oriented because they process a single object at a time.

Source: Cmdlet Overview [Microsoft]

Có cái gì để thêm vào lời giải thích? Tắt âm thanh trong các ý kiến. Bạn muốn đọc thêm câu trả lời từ những người dùng Stack Exchange có hiểu biết công nghệ khác? Xem toàn bộ chuỗi thảo luận tại đây.

Đề xuất: