GetProc Tutorial
This section provides a tutorial for creating a Get-Proc cmdlet that is very similar to the Get-Process cmdlet provided by Windows PowerShell. This tutorial provides fragments of code that illustrate how cmdlets are implemented, and an explanation of the code.
Topics in this Tutorial
The topics in this tutorial are designed to be read sequentially, with each topic building on what was discussed in the previous topic.
Creating a Cmdlet without Parameters: This section describes how to create a cmdlet that retrieves information from the local computer without the use of parameters, and then writes the information to the pipeline.
Adding Parameters that Process Command-Line Input: This section describes how to add a parameter to the Get-Proc cmdlet so that the cmdlet can process input based on explicit objects passed to the cmdlet. The implementation described here retrieves processes based on their name, and then writes the information to the pipeline.
Adding Parameters that Process Pipeline Input: This section describes how to add a parameter to the Get-Proc cmdlet so that the cmdlet can process objects passed to it through the pipeline. The implementation cmdlet described here retrieves processes based on objects passed to the cmdlet, and then writes the information to the pipeline.
Adding Non-terminating Error Reporting to Your Cmdlet: This section describes how to add non-terminating error reporting to a cmdlet. The implementation described here detects non-terminating errors that occur when processing input, and writes an error record to the error stream.
See Also
PowerShell
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기