Tutorials for Writing Cmdlets
This section contains tutorials for writing cmdlets. These tutorials include the code needed to write the cmdlets, plus an explanation of why the code is needed. These topics will be very helpful for those who are just starting to write cmdlets.
Important
For those who want code examples with less description, see Cmdlet Samples.
In This Section
GetProc Tutorial - This tutorial describes how to define a cmdlet class and add basic functionality such as adding parameters and reporting errors. The cmdlet described in this tutorial is very similar to the Get-Process cmdlet provided by Windows PowerShell.
StopProc Tutorial - This tutorial describes how to define a cmdlet and add functionality such as user prompts, wildcard support, and the use of parameter sets. The cmdlet described here performs the same task as the Stop-Process cmdlet provided by Windows PowerShell.
SelectStr Tutorial - This tutorial describes how to define a cmdlet that accesses a data store. The cmdlet described here performs the same task as the Select-String cmdlet provided by Windows PowerShell.
See Also
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro