Building a PowerShell cmdlet using C# - Part 4: Packaging the Cmdlet
This is the fourth and last article of the series on how to build a PowerShell cmdlet. On the previous articles we created a simple cmdlet, troubleshooted the code and took a quick tour on the output streams. Although you can import the dll built by Visual Studio directly as a module, this is not the best approach, since you won't be able to publish it, provide help for your cmdlets and many other features provided by PowerShell modules. To create a module we'll start by creating a folder with the same name of the module. This is the folder that is going to hold all the module files. We'll call this module DemoCmdlet, since this is the name of the Visual Studio project and the dll produced. All modules require a module manifest so let's create one with the New-ModuleManifest cmdlet: PS C:\DemoCmdlet> New-ModuleManifest -Path DemoCmdlet.psd1 PS C:\DemoCmdlet> ls Directory: C:\Users\cpolydorou\OneDrive\tmp\Blog\DemoCmdlet Mode LastWriteTime L...