-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPAF_Get-Example.ps1
56 lines (43 loc) · 1.25 KB
/
PAF_Get-Example.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<#
.SYNOPSIS
Template
.DESCRIPTION
This is a template file demonstrating how to prepare a function snippet for the PowerShell Awesome Module.
.LINK
https://github.com/voytas75/PowershellFramework
The GitHub repository for the PowerShell Awesome Framework.
#>
function Get-Example {
<#
:CATEGORY
Example
:NAME
Get-Example
#>
[CmdletBinding()]
param ( )
# Here goes the code for the function snippet
return @"
To prepare a function snippet for PAF, you must follow these steps:
1. Add a prefix to the name of the snippet file (e.g., 'PAF_Get-Example.ps1'). Look at tempate files:
- '${PSScriptRoot}\PAF_Get-Example.ps1'
- '${PSScriptRoot}\TEMPLATE_Get-Example.ps1'
2. Add inline help at the top of the file, and leave two empty lines after it:
<#
.SYNOPSIS
Template
.DESCRIPTION
This is a template file demonstrating how to prepare a function snippet for the PowerShell Awesome Module.
#>
3. Inside the function body, include 'category' and 'name' tags after the function declaration line, as follows:
<#
:CATEGORY
Put here the name of the category
:NAME
Get-Example
#>
4. Ensure the snippet contains logic to execute all the desired functionality.
"@
}
# The snippet must have code to run the function(s) when invoked by PAF.
Get-Example