- PowerShell for Office 365
- Martin Machado Prashant G Bhoyar
- 167字
- 2021-07-02 18:50:37
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.
推薦閱讀
- ClickHouse性能之巔:從架構(gòu)設(shè)計(jì)解讀性能之謎
- PyTorch自動(dòng)駕駛視覺感知算法實(shí)戰(zhàn)
- 垃圾回收的算法與實(shí)現(xiàn)
- 編程卓越之道(卷3):軟件工程化
- 數(shù)據(jù)庫系統(tǒng)原理及MySQL應(yīng)用教程
- x86匯編語言:從實(shí)模式到保護(hù)模式(第2版)
- Blockly創(chuàng)意趣味編程
- SQL Server 2012數(shù)據(jù)庫管理與開發(fā)項(xiàng)目教程
- 小程序開發(fā)原理與實(shí)戰(zhàn)
- 程序員修煉之道:通向務(wù)實(shí)的最高境界(第2版)
- Learning OpenStack Networking(Neutron)(Second Edition)
- MATLAB GUI純代碼編寫從入門到實(shí)戰(zhàn)
- Python機(jī)器學(xué)習(xí)與量化投資
- 基于MATLAB的控制系統(tǒng)仿真及應(yīng)用
- Implementing DevOps with Ansible 2