官术网_书友最值得收藏!

How to pass parameters to cmdlets and storing results as a variable

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.

They basically accept input via parameters, perform the operation, and then output the results.

Cmdlets differ from commands in a command-shell environment in the following ways:

  • Cmdlets are instances of .NET Framework classes; they are not standalone 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 and these operations are normally handled by the Windows PowerShell runtime.
  • Cmdlets process input objects from the pipeline rather than from streams of text, and typically deliver objects as output to the pipeline.
  • Cmdlets are record-oriented because they process a single object at a time.
主站蜘蛛池模板: 天水市| 庄河市| 咸宁市| 横山县| 景德镇市| 中卫市| 巩留县| 筠连县| 石渠县| 广德县| 临泽县| 册亨县| 屏山县| 康平县| 工布江达县| 景谷| 皮山县| 汝阳县| 青神县| 康平县| 天全县| 湘潭市| 开封县| 兴隆县| 台东县| 凤山市| 普格县| 潜江市| 彰化市| 长丰县| 靖边县| 女性| 东莞市| 准格尔旗| 义马市| 吉隆县| 类乌齐县| 大化| 思南县| 敦煌市| 洪湖市|