A cmdlet is a specialized PowerShell command implemented as a .NET class for performing one focused operation. Cmdlets provide an administrator-friendly interface to capabilities exposed by .NET Framework, CIM, COM, and Windows APIs, using consistent names and parameters. section 25.1
Treat a cmdlet like a focused tool rather than a miniature application. Combine small cmdlets in a pipeline or controller script to complete larger processes, instead of building one command that handles unrelated tasks. section 3.1 section 6.1
Use cmdlets effectively by following these practical rules:
- Give each tool one task and make it behave like a built-in PowerShell command. section 3.1
- Connect focused tools with pipelines or controller scripts when the operation is really a larger process. section 3.1 section 6.1
- Prefer cmdlet wrappers over embedding arbitrary raw .NET or C# code in scripts. section 25.1
Focused commands in a pipeline
Get-Process retrieves processes, while Stop-Process stops them; neither becomes a broad “Manage-Processes” command. A disk-reporting pipeline can retrieve logical disks, filter local drives, and select the required properties. section 6.1
Use the single-task rule as a quick design check before combining commands into a larger automation process. section 3.1

