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

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.
主站蜘蛛池模板: 方正县| 肥乡县| 当阳市| 明光市| 潮安县| 南城县| 龙门县| 如东县| 福州市| 额济纳旗| 绥中县| 盐池县| 安多县| 莆田市| 当阳市| 喀喇| 巨鹿县| 镇远县| 福泉市| 酒泉市| 延边| 凉城县| 汽车| 普定县| 青神县| 桐乡市| 上高县| 岳普湖县| 清原| 多伦县| 潞城市| 邢台县| 新沂市| 周宁县| 汝阳县| 柳江县| 阳江市| 南涧| 揭西县| 开封县| 高要市|