1
+ <#
2
+ . SYNOPSIS
3
+ Shows help summary for all Custom Configuration scripts.
4
+
5
+ . DESCRIPTION
6
+ Shows help summary for all Custom Configuration scripts.
7
+
8
+ . INPUTS
9
+ None.
10
+
11
+ . OUTPUTS
12
+ None.
13
+
14
+ . EXAMPLE
15
+ PS> .\Get-CustomConfigurationHelp
16
+ #>
17
+
18
+ <#
19
+ .BASEPARAMETERS Silent
20
+
21
+ .TODO
22
+ #>
23
+ # Requires -Version 5.0
24
+ # Requires -Modules Varan .PowerShell .Base
25
+ # Requires -Modules Varan .PowerShell .Common
26
+ # Requires -Modules Varan .PowerShell .Validation
27
+ using module Varan.PowerShell.Validation
28
+ # ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29
+ [CmdletBinding (SupportsShouldProcess , ConfirmImpact = ' None' )]
30
+ param (
31
+ )
32
+ DynamicParam { Build-BaseParameters }
33
+
34
+ Begin
35
+ {
36
+ Write-LogTrace " Execute: $ ( Get-RootScriptName ) "
37
+ $minParams = Get-MinimumRequiredParameterCount - CommandInfo (Get-Command $MyInvocation.MyCommand.Name )
38
+ $cmd = @ {}
39
+
40
+ if (Get-BaseParamHelpFull ) { $cmd.HelpFull = $true }
41
+ if ((Get-BaseParamHelpDetail ) -Or ($PSBoundParameters.Count -lt $minParams )) { $cmd.HelpDetail = $true }
42
+ if (Get-BaseParamHelpSynopsis ) { $cmd.HelpSynopsis = $true }
43
+
44
+ if ($cmd.Count -gt 1 ) { Write-DisplayHelp - Name " $ ( Get-RootScriptPath ) " - HelpDetail }
45
+ if ($cmd.Count -eq 1 ) { Write-DisplayHelp - Name " $ ( Get-RootScriptPath ) " @cmd }
46
+ }
47
+ Process
48
+ {
49
+ try
50
+ {
51
+ $scriptCol = " $ ( ' Script' .PadRight(38 , ' ' )) "
52
+ $aliasCol = " $ ( ' Alias' .PadRight(16 , ' ' )) "
53
+ $descCol = ' Description'
54
+ Write-DisplayHost " $scriptCol$aliasCol$descCol " - Style HelpItem
55
+
56
+ Get-ChildItem $PSScriptRoot - Filter " *.ps1" |
57
+ Sort-Object { $_.BaseName } |
58
+ Foreach-Object - Process {
59
+ Write-DisplayHelp - Name $_.FullName - HelpSynopsis - DontExit
60
+ }
61
+
62
+ }
63
+ catch [System.Exception ]
64
+ {
65
+ Write-DisplayError $PSItem.ToString () - Exit
66
+ }
67
+ }
68
+ End
69
+ {
70
+ }
0 commit comments