The PowerShell Awesome Framework is a versatile and user-friendly PowerShell module that empowers users to streamline their scripting experience with a collection of useful code snippets. This framework is designed to enhance productivity and simplify the execution of various PowerShell tasks, making it a valuable tool for both beginners and experienced PowerShell users.
config.json
that is automatically generated when you run the Start-PAF
command for the first time. This configuration file allows users to modify settings and personalize the framework’s behavior to suit their preferences and workflow. You can easily adjust the framework’s options to match your unique coding needs by editing the settings in the config.json file.The module is available on PowerShell Gallery.
Install-Module -Name PAF
Import module
Import-Module -Module PAF
To get all commands in installed module including cmdlets, functions and aliases:
Get-Command -Module PAF
Start framework to load the menu (JSON configuration file config.json
is automatically generated).
Start-PAF
Display configuration. Employ the Get-PAFConfiguration
command to load your custom configuration (JSON configuration file config.json
is automatically generated).
Get-PAFConfiguration
Invoke the Save-PAFConfiguration
command to save configuration (JSON configuration file config.json
is automatically generated).
Save-PAFConfiguration
To prepare a function snippet for adding it to the PowerShell Awesome Module use tempate PAF\snippets\core\TEMPLATE_Get-Example.ps1
or example PAF\snippets\core\PAF_Get-Example.ps1
and follow these steps:
Create the Snippet File:
Place the snippet file in one of the following folders:
$PSRootPath\snippets\core\
$([Environment]::GetFolderPath("MyDocuments"))\PowerShell Awesome Framework\user_snippets\
(recommended)Make sure the snippet file has a name with the prefix ‘PAF_’ followed by the function name. For example: PAF_Get-Example.ps1
Add Inline Help:
At the top of the snippet file, include inline help using PowerShell comment-based help format. The help should contain a synopsis and description of the snippet. Leave two empty lines after the help section. Here’s an example:
<#
.SYNOPSIS
Template
.DESCRIPTION
Template file to show how to prepare a function snippet for the PowerShell Awesome Module
#>
Specify Category and Name in Function Body:
Inside the function body, include special tags :CATEGORY
and :NAME
to specify the category and name of the snippet. Can’t be in inline help block!
Use the following format:
<#
:CATEGORY
put here the name of the category
:NAME
Get-Example
#>
Replace put here the name of the category
with the actual category name, and Get-Example
with the name of the function that the snippet represents.
Ensure Proper Logic:
Make sure that the snippet contains logic to execute the functionality that the user intends. Test the snippet to ensure it works correctly.
Add to PowerShell Awesome Module:
Once the snippet file is ready, add it to the user snippets folder where it belongs. For example, if the snippet is for a function called Get-Example
, it would be placed in the PAF_Get-Example.ps1
file inside the $([Environment]::GetFolderPath("MyDocuments"))\PowerShell Awesome Framework\user_snippets\
folder.
By following these steps, you can contribute function snippets to the PowerShell Awesome Module effectively. Ensure that your snippets adhere to the guidelines mentioned above for consistency and compatibility with the module.
We use SemVer for versioning.
We welcome contributions from the community! Feel free to submit pull requests, report issues, or suggest new features to make the framework even more powerful and user-friendly.
Clone the Repository: Clone the PowerShell Awesome Framework repository to your local machine.
The PowerShell Awesome Framework is released under the MIT License.
Contact: If you have any questions or need assistance, please feel free to reach out to us via GitHub Issues.
Join us on the journey to make PowerShell scripting a truly awesome experience!