pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/jdhitsolutions/PSFunctionTools/commit/9915cbb6e06f5b86c82bf764d98d761f0939a680

crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-b40ec823a1a6a1af.css" /> v1.1.0 · jdhitsolutions/PSFunctionTools@9915cbb · GitHub
Skip to content

Commit 9915cbb

Browse files
v1.1.0
1 parent de77a07 commit 9915cbb

41 files changed

Lines changed: 263 additions & 251 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

License.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 JDH Information Technology Solutions, Inc.
3+
Copyright (c) 2022-2023 JDH Information Technology Solutions, Inc.
44

55

66
Permission is hereby granted, free of charge, to any person obtaining a copy

PSFunctionTools.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
@{
66
RootModule = 'PSFunctionTools.psm1'
7-
ModuleVersion = '1.0.0'
7+
ModuleVersion = '1.1.0'
88
CompatiblePSEditions = 'Core'
99
GUID = '151466e0-a952-4b6a-ad81-40dafc9ef9bb'
1010
Author = 'Jeff Hicks'
1111
CompanyName = 'JDH Information Technology Solutions, Inc.'
12-
Copyright = '(c) 2021-2022 JDH Information Technology Solutions, Inc.'
12+
Copyright = '(c) 2021-2023 JDH Information Technology Solutions, Inc.'
1313
Description = 'A set of PowerShell commands for managing and automating PowerShell scripts, functions, and modules.'
1414
PowerShellVersion = '7.1'
1515
# TypesToProcess = @()

PSFunctionTools.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Get-Childitem $psscriptroot\functions\*.ps1 -recurse |
2+
Get-Childitem $PSScriptRoot\functions\*.ps1 -recurse |
33
Foreach-Object {
44
. $_.FullName
55
}

changelog.md

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,72 @@
11
# Changelog for PSFunctionTools
22

3+
## v1.1.0
4+
5+
### Changed
6+
7+
- Code clean up and reformatting.
8+
- Image resizing.
9+
310
## v1.0.0
411

5-
+ Added online help links for previously published commands.
6-
+ Bumped version number to reflect feature-complete release.
7-
+ Added `Export-FunctionToFile` to export a loaded function from your session to a script file.
8-
+ Help updates.
9-
+ Updated `README.md`.
12+
- Added online help links for previously published commands.
13+
- Bumped version number to reflect feature-complete release.
14+
- Added `Export-FunctionToFile` to export a loaded function from your session to a script file.
15+
- Help updates.
16+
- Updated `README.md`.
1017

1118
## v0.6.0
1219

13-
+ Added online help links for previously published commands.
14-
+ Modified `Get-FunctionAttribute` to accept pipeline input for `Name` and `Path` parameters.
15-
+ Modified `Get-FunctionAlias` to accept pipeline input for `Path`.
16-
+ Added command `Get-PSFunctionTools` and a related custom format file. This command makes it easy to see all module commands.
17-
+ Added alias `ffn` for `Format-FunctionName`.
18-
+ Added alias `gfn` for `Get-FunctionName`.
19-
+ Added alias `tfn` for `Test-FunctionName`.
20-
+ Added command `Get-FunctionProfile` and alias `gfp`.
21-
+ Revised warning message in `Get-FunctionAttribute` and `Get-ParameterBlock` to include function name and path.
22-
+ Updated `README.md`.
23-
+ Help updates.
24-
+ Initial public release to the PowerShell Gallery.
20+
- Added online help links for previously published commands.
21+
- Modified `Get-FunctionAttribute` to accept pipeline input for `Name` and `Path` parameters.
22+
- Modified `Get-FunctionAlias` to accept pipeline input for `Path`.
23+
- Added command `Get-PSFunctionTools` and a related custom format file. This command makes it easy to see all module commands.
24+
- Added alias `ffn` for `Format-FunctionName`.
25+
- Added alias `gfn` for `Get-FunctionName`.
26+
- Added alias `tfn` for `Test-FunctionName`.
27+
- Added command `Get-FunctionProfile` and alias `gfp`.
28+
- Revised warning message in `Get-FunctionAttribute` and `Get-ParameterBlock` to include function name and path.
29+
- Updated `README.md`.
30+
- Help updates.
31+
- Initial public release to the PowerShell Gallery.
2532

2633
## v0.5.0
2734

28-
+ Module will be written to support PowerShell 7.1 and later. Commands may run in Windows PowerShell but I am __not__ marking the module as `Desktop` compatible.
29-
+ Added a parameter called `AsTree` to `Get-ModuleLayout` to show module layout as a tree.
30-
+ Moved code to parse path for `AST` data to a private helper function.
31-
+ Help documentation updates.
32-
+ Initial Pester 5 tests for the module and functions.
33-
+ Module manifest updates.
34-
+ Updated `README.md`.
35-
+ First public preview release.
35+
- Module will be written to support PowerShell 7.1 and later. Commands may run in Windows PowerShell but I am __not__ marking the module as `Desktop` compatible.
36+
- Added a parameter called `AsTree` to `Get-ModuleLayout` to show module layout as a tree.
37+
- Moved code to parse path for `AST` data to a private helper function.
38+
- Help documentation updates.
39+
- Initial Pester 5 tests for the module and functions.
40+
- Module manifest updates.
41+
- Updated `README.md`.
42+
- First public preview release.
3643

3744
## v0.4.0
3845

39-
+ Moved helper functions in `New-ModuleFromFiles` to `functions\private\helpers.ps1'`.
40-
+ Updated `New-ModuleFromFiles` to use `Functionpath` parameter when creating the root psm1 file.
41-
+ Added function `New-ModuleFromLayout`.
42-
+ Help updates.
46+
- Moved helper functions in `New-ModuleFromFiles` to `functions\private\helpers.ps1'`.
47+
- Updated `New-ModuleFromFiles` to use `Functionpath` parameter when creating the root psm1 file.
48+
- Added function `New-ModuleFromLayout`.
49+
- Help updates.
4350

4451
## v0.3.0
4552

46-
+ Added sample scripts.
47-
+ Modified `New-CommentHelp` with a `-TemplateOnly` parameter to generate help without any parameter definitions.
48-
+ Modified `Get-FunctionName` to accept `Path` parameter values from pipeline input.
49-
+ Modified `Get-ParameterBlock` to accept `Path` and `Name` values from pipeline input by property name.
50-
+ Added function `New-ModuleFromFiles`. This should be considered experimental.
53+
- Added sample scripts.
54+
- Modified `New-CommentHelp` with a `-TemplateOnly` parameter to generate help without any parameter definitions.
55+
- Modified `Get-FunctionName` to accept `Path` parameter values from pipeline input.
56+
- Modified `Get-ParameterBlock` to accept `Path` and `Name` values from pipeline input by property name.
57+
- Added function `New-ModuleFromFiles`. This should be considered experimental.
5158

5259
## v0.2.0
5360

54-
+ Updated help documentation.
55-
+ Modified `Format-FunctionName` to accept pipeline input by value.
56-
+ Added function `Get-ParameterBlock` with an alias of `gpb`.
57-
+ Added function `Get-FunctionAttribute` with an alias of `gfa`.
58-
+ Added a parameter called `Detailed` to `Get-FunctionName` to write a custom object to the pipeline which includes the path to the file. Added a custom format file `psfunctionname.format.ps1xml`.
61+
- Updated help documentation.
62+
- Modified `Format-FunctionName` to accept pipeline input by value.
63+
- Added function `Get-ParameterBlock` with an alias of `gpb`.
64+
- Added function `Get-FunctionAttribute` with an alias of `gfa`.
65+
- Added a parameter called `Detailed` to `Get-FunctionName` to write a custom object to the pipeline which includes the path to the file. Added a custom format file `psfunctionname.format.ps1xml`.
5966

6067
## v0.1.0
6168

62-
+ Initial files.
63-
+ Added `Get-ModuleLayout` with format file `modulelayout.format.ps1xml`.
64-
+ Modified `Get-PSScriptRequirements` to write a `PSScriptRequirements` object to the pipeline. Added the format file `psscriptrequirements.format.ps1xml`.
65-
+ Updated help documentation.
69+
- Initial files.
70+
- Added `Get-ModuleLayout` with format file `modulelayout.format.ps1xml`.
71+
- Modified `Get-PSScriptRequirements` to write a `PSScriptRequirements` object to the pipeline. Added the format file `psscriptrequirements.format.ps1xml`.
72+
- Updated help documentation.

docs/Export-FunctionFromFile.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ Export a PowerShell function from a script file.
1616
### All (Default)
1717

1818
```yaml
19-
Export-FunctionFromFile [-Path] <String> [-OutputPath <String>] [-Passthru]
19+
Export-FunctionFromFile [-Path] <String> [-OutputPath <String>] [-PassThru]
2020
[-Remove] [-WhatIf] [-Confirm] [<CommonParameters>]
2121
```
2222

2323
### byName
2424

2525
```yaml
2626
Export-FunctionFromFile [-Path] <String> [-OutputPath <String>]
27-
[-Name <String[]>] [-Passthru] [-Remove] [-WhatIf] [-Confirm] [<CommonParameters>]
27+
[-Name <String[]>] [-PassThru] [-Remove] [-WhatIf] [-Confirm] [<CommonParameters>]
2828
```
2929

3030
### all
3131

3232
```yaml
33-
Export-FunctionFromFile [-Path] <String> [-OutputPath <String>] [-All] [-Remove] [-Passthru] [-WhatIf] [-Confirm] [<CommonParameters>]
33+
Export-FunctionFromFile [-Path] <String> [-OutputPath <String>] [-All] [-Remove] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
3434
```
3535

3636
## DESCRIPTION
@@ -125,7 +125,7 @@ Accept pipeline input: False
125125
Accept wildcard characters: False
126126
```
127127
128-
### -Passthru
128+
### -PassThru
129129
130130
Pass the output file to the pipeline.
131131

docs/Export-FunctionToFile.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Export a PowerShell function to a file.
1414
## SYNTAX
1515

1616
```yaml
17-
Export-FunctionToFile [-Name] <String> [-Path <String>] [-Passthru] [-Requires <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
17+
Export-FunctionToFile [-Name] <String> [-Path <String>] [-PassThru] [-Requires <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -34,7 +34,7 @@ Get the prompt function from your PowerShell session and export it to C:\Scripts
3434
### Example 2
3535

3636
```powershell
37-
PS C:\> Export-FunctionToFile -Name New-FileLink -Path c:\work -Requires "#requires -version 5.1","#requires -RunAsAdministrator" -Passthru
37+
PS C:\> Export-FunctionToFile -Name New-FileLink -Path c:\work -Requires "#requires -version 5.1","#requires -RunAsAdministrator" -PassThru
3838
3939
Directory: C:\work
4040
@@ -79,7 +79,7 @@ Accept pipeline input: True (ByValue)
7979
Accept wildcard characters: False
8080
```
8181
82-
### -Passthru
82+
### -PassThru
8383
8484
Show the file result.
8585

docs/Export-ModuleLayout.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Export a model module layout.
1515

1616
```yaml
1717
Export-ModuleLayout -SourcePath <String> [-Version <String>]
18-
[-FilePath <String>] [-Passthru] [<CommonParameters>]
18+
[-FilePath <String>] [-PassThru] [<CommonParameters>]
1919
```
2020

2121
## DESCRIPTION
@@ -77,7 +77,7 @@ Accept pipeline input: False
7777
Accept wildcard characters: False
7878
```
7979
80-
### -Passthru
80+
### -PassThru
8181
8282
Show the file result.
8383

en-us/PSFunctionTools-help.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
<dev:defaultValue>None</dev:defaultValue>
204204
</command:parameter>
205205
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
206-
<maml:name>Passthru</maml:name>
206+
<maml:name>PassThru</maml:name>
207207
<maml:description>
208208
<maml:para>Pass the output file to the pipeline.</maml:para>
209209
</maml:description>
@@ -286,7 +286,7 @@
286286
<dev:defaultValue>None</dev:defaultValue>
287287
</command:parameter>
288288
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
289-
<maml:name>Passthru</maml:name>
289+
<maml:name>PassThru</maml:name>
290290
<maml:description>
291291
<maml:para>Pass the output file to the pipeline.</maml:para>
292292
</maml:description>
@@ -370,7 +370,7 @@
370370
<dev:defaultValue>None</dev:defaultValue>
371371
</command:parameter>
372372
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
373-
<maml:name>Passthru</maml:name>
373+
<maml:name>PassThru</maml:name>
374374
<maml:description>
375375
<maml:para>Pass the output file to the pipeline.</maml:para>
376376
</maml:description>
@@ -521,7 +521,7 @@
521521
<dev:defaultValue>False</dev:defaultValue>
522522
</command:parameter>
523523
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
524-
<maml:name>Passthru</maml:name>
524+
<maml:name>PassThru</maml:name>
525525
<maml:description>
526526
<maml:para>Show the file result.</maml:para>
527527
</maml:description>
@@ -594,7 +594,7 @@
594594
<dev:defaultValue>None</dev:defaultValue>
595595
</command:parameter>
596596
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
597-
<maml:name>Passthru</maml:name>
597+
<maml:name>PassThru</maml:name>
598598
<maml:description>
599599
<maml:para>Show the file result.</maml:para>
600600
</maml:description>
@@ -685,7 +685,7 @@
685685
</command:example>
686686
<command:example>
687687
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
688-
<dev:code>PS C:\&gt; Export-FunctionToFile -Name New-FileLink -Path c:\work -Requires "#requires -version 5.1","#requires -RunAsAdministrator" -Passthru
688+
<dev:code>PS C:\&gt; Export-FunctionToFile -Name New-FileLink -Path c:\work -Requires "#requires -version 5.1","#requires -RunAsAdministrator" -PassThru
689689

690690
Directory: C:\work
691691

@@ -732,7 +732,7 @@ Mode LastWriteTime Length Name
732732
<dev:defaultValue>modulelayout.json</dev:defaultValue>
733733
</command:parameter>
734734
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
735-
<maml:name>Passthru</maml:name>
735+
<maml:name>PassThru</maml:name>
736736
<maml:description>
737737
<maml:para>Show the file result.</maml:para>
738738
</maml:description>
@@ -782,7 +782,7 @@ Mode LastWriteTime Length Name
782782
<dev:defaultValue>modulelayout.json</dev:defaultValue>
783783
</command:parameter>
784784
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
785-
<maml:name>Passthru</maml:name>
785+
<maml:name>PassThru</maml:name>
786786
<maml:description>
787787
<maml:para>Show the file result.</maml:para>
788788
</maml:description>

functions/private/helpers.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ Function _mkHelp {
77
#the path to the psd1 file
88
[string]$ModulePath,
99
#where to put the md files
10-
[string]$Markdownpath,
10+
[string]$MarkdownPath,
1111
#where to put the xml output
1212
[string]$OutputPath
1313
)
1414

15-
Write-Verbose "Invoking Import-Module on $modulepath"
15+
Write-Verbose "Invoking Import-Module on $ModulePath"
1616
Import-Module -Name $ModulePath -Scope global
1717
$ModuleName = (Get-Item $ModulePath).BaseName
1818
Get-Command -Module $NewModuleName -OutVariable modcmds | Out-String | Write-Verbose
19-
Write-Verbose "Invoking New-MarkdownHelp for module $modulename"
19+
Write-Verbose "Invoking New-MarkdownHelp for module $ModuleName"
2020
Try {
21-
New-MarkdownHelp -Module $modulename -OutputFolder $Markdownpath -Force -ErrorAction Stop
21+
New-MarkdownHelp -Module $ModuleName -OutputFolder $MarkdownPath -Force -ErrorAction Stop
2222
Write-Verbose "Invoking New-Externalhelp to $outputPath"
23-
New-ExternalHelp -Path $Markdownpath -OutputPath $OutputPath -Force -ErrorAction Stop
23+
New-ExternalHelp -Path $MarkdownPath -OutputPath $OutputPath -Force -ErrorAction Stop
2424
}
2525
Catch {
2626
Write-Warning "Failed to generate help content. $($_.exception.message)"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy