https://github.com/iricigor/simpletemplates
This project is aimed to create set of simple PowerShell cmdlets in C# that would assist developers in writing PowerShell modules.
https://github.com/iricigor/simpletemplates
cmdlet csharp hacktoberfest powershell powershell-module templates
Last synced: 4 months ago
JSON representation
This project is aimed to create set of simple PowerShell cmdlets in C# that would assist developers in writing PowerShell modules.
- Host: GitHub
- URL: https://github.com/iricigor/simpletemplates
- Owner: iricigor
- License: mit
- Created: 2022-10-15T17:25:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-02T22:41:24.000Z (over 3 years ago)
- Last Synced: 2025-10-09T14:02:41.218Z (4 months ago)
- Topics: cmdlet, csharp, hacktoberfest, powershell, powershell-module, templates
- Language: PowerShell
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Templates
This project is aimed to create set of simple PowerShell cmdlets in C# that would assist developers in writing PowerShell modules.
## Commands
Planned list of commands is:
- `New-STBasicFunction` - creates simple PowerShell function
- `New-STAdvancedFunction` - create PS function with begin, process and end blocks
- `New-STTestCase` - creates a Pester test case
Ultimately, all of this will be followed by `New-STModule` and maybe more (pipelines, documentation, etc.)
Project is done in scope of Hacktoberfest 2022
## Tasks list
- [Currently worked on tasks ](https://github.com/iricigor/Simple-Templates/milestone/2)
- [All tasks ](https://github.com/iricigor/Simple-Templates/issues)


- [Open a new issue](https://github.com/iricigor/Simple-Templates/issues/new/choose)
## Links
- https://hacktoberfest.com/
- [Using C# to Create PowerShell Cmdlets: The Basics @red-gate.com](https://www.red-gate.com/simple-talk/development/dotnet-development/using-c-to-create-powershell-cmdlets-the-basics/)
- [How to create a Standard Library binary module @learn.microsoft.com](https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/create-standard-library-binary-module?view=powershell-7.2)
- [Using Visual Studio Code to debug compiled cmdlets](https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/vscode/using-vscode-for-debugging-compiled-cmdlets)
## Similar projects
- https://github.com/PowershellFrameworkCollective/psframework - active
- https://github.com/PowerShellOrg/Plaster - legendary, but last PR in 2021
- https://github.com/PoshCode/ModuleBuilder - last release in 2020
## Initial project creation
Run `dotnet` commands:
```batch
dotnet new -i Microsoft.PowerShell.Standard.Module.Template
dotnet new psmodule
dotnet new gitignore
dotnet build
```
Then, verify it in PowerShell:
```powershell
Import-Module '.\bin\Debug\netstandard2.0\Simple_Templates.dll'
Get-Module 'Simple_Templates'
Test-SampleCmdlet 12
```
It should generate output similar to this:
```
FavoriteNumber FavoritePet
-------------- -----------
12 Dog
```