Skip to content

Commit 7bf8265

Browse files
committed
Adding module info to summary table, Logging.psm1
1 parent 536ad57 commit 7bf8265

File tree

11 files changed

+478
-433
lines changed

11 files changed

+478
-433
lines changed

Generate-ScriptMarkdownHelp.ps1

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,18 @@ Some PowerShell scipts that can be hopefully also useful to others. Most of them
148148
'@
149149
Import-Module platyps
150150
$env:path += ";$path"
151-
$files = Get-ChildItem $path -File -Include ('*.ps1') -Recurse
151+
$files = Get-ChildItem $path -File -Include ('*.ps1','*.psm1') -Recurse
152152
$htCheck = @{}
153153
foreach ($file in $files) {
154-
$htCheck[$file.Name] = 0
155-
. "$($file.FullName)"
156-
$functions = Get-FunctionFromScript -File $file.FullName -OutputMetaData | sort Name -unique
154+
if ($file.Extension -eq '.psm1'){
155+
Import-Module $file.Fullname
156+
$functions = Get-Command -Module $file.BaseName
157+
}
158+
else{
159+
$htCheck[$file.Name] = 0
160+
. "$($file.FullName)"
161+
$functions = Get-FunctionFromScript -File $file.FullName -OutputMetaData | sort Name -unique
162+
}
157163
foreach ($function in $functions) {
158164
$help = $Null
159165

PowerShellScripts.psd1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ NestedModules = @(
105105
'.\modules\FileSearcher\FileSearcher.psm1',
106106
'.\modules\Get-FileMethods\Get-FileMethods.psm1',
107107
'.\modules\Get-LegacyHelp\Get-LegacyHelp.psm1',
108+
'.\modules\Logging\Logging.psm1',
108109
'.\modules\Out-DataGridView\Out-DataGridView.psm1',
109110
'.\modules\Set-OOTO\Set-OOTO.psm1',
110111
'.\programming exercises\8 Queens.ps1',
@@ -251,6 +252,16 @@ PrivateData = @{
251252

252253

253254

255+
256+
257+
258+
259+
260+
261+
262+
263+
264+
254265

255266

256267

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Some PowerShell scipts that can be hopefully also useful to others. Most of them
3636
| Out-ConditionalColor | format output\Out-ConditionalColor.ps1 | Filter to conditionally format PowerShell output within the PowerShell console. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Out-ConditionalColor.md) |
3737
| Out-ConditionalColorProperties | format output\Out-ConditionalColorProperties.ps1 | Filter to conditionally format property values within PowerShell output on the console. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Out-ConditionalColorProperties.md) |
3838
| Out-Diff | format output\Out-Diff.ps1 | Generate html diff from git diff output using diff2html. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Out-Diff.md) |
39+
| Get-ACEData | ACE\ACE.psm1 | Checkout the whole modules as it exports several more functions. Queries Excel and Access files. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Get-ACEData.md) |
40+
| Clear-Clipboard | Clear-Clipboard\Clear-Clipboard.psm1 | Identify the process that currently blocks the clipboard (Using GetOpenClipboardWindow and GetWindowThreadProcessId API calls) Opens a small GUI offering options to either stop or restart the process | [Link](https://powershellone.wordpress.com/2016/02/25/fix-clipboard-is-not-working-restart-process-with-powershell/) | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Clear-Clipboard.md) |
41+
| Get-LegacyHelp | Get-LegacyHelp\Get-LegacyHelp.psm1 | Display help for windows commandline commands | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Get-LegacyHelp.md) |
42+
| Start-Logging | Logging\Logging.psm1 | Module to provide a logging functionality for scripts originally written by Oisin Grehan see link. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Start-Logging.md) |
3943
| 8Queens | programming exercises\8 Queens.ps1 | PowerShell solution for a classical programming exercise. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/8Queens.md) |
4044
| Confirm-Brackets | programming exercises\Confirm-Brackets.ps1 | Function to check and display (through indentation) pairing of braces, brackets, and parentheses '{[()]} | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Confirm-Brackets.md) |
4145
| GenerateSolveMaze | programming exercises\GenerateSolveMaze.ps1 | Function to generate a GUI (Windows forms) to build and solve random mazes | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/GenerateSolveMaze.md) |
@@ -54,6 +58,7 @@ Some PowerShell scipts that can be hopefully also useful to others. Most of them
5458
| Get-FormatStrings | Utils\Get-FormatStrings.ps1 | Show common format strings for a given input and the respective outputs | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Get-FormatStrings.md) |
5559
| Get-GoogleSuggestion | Utils\Get-GoogleSuggestion.ps1 | Function to get "Did you mean?" suggestions from Google. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Get-GoogleSuggestion.md) |
5660
| Get-MSDNInfo | Utils\Get-MSDNInfo.ps1 | Opens the MSDN web page of an object member: type, method or property. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Get-MSDNInfo.md) |
61+
| Get-ParamInfo | Utils\Get-ParamInfo.ps1 | Retrieve extensive parameter information about a cmdlet | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Get-ParamInfo.md) |
5762
| Get-Uninstaller | Utils\Get-Uninstaller.ps1 | Function to get the uninstaller for installed software via registry (PowerShell v4 and <) or Get-Package) | [Link](https://powershellone.wordpress.com/2016/02/13/retrieve-uninstallstrings-to-fix-installer-issues/) | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Get-Uninstaller.md) |
5863
| Get-WIFIPassword | Utils\Get-WIFIPassword.ps1 | Get the Wifi password of stored networks using netsh. | | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Get-WIFIPassword.md) |
5964
| Invoke-HTMLPesterReport | Utils\Invoke-HTMLPesterReport.ps1 | Generate HTML report for Pester test results using ReportUnit.exe | [Link](https://powershellone.wordpress.com/2016/05/18/reporting-against-pester-test-results/) | [Link](https://github.com/DBremen/PowerShellScripts/blob/master/docs/Invoke-HTMLPesterReport.md) |

Utils/Get-ParamInfo.ps1

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ function Get-ParamInfo {
88
Format the Get-Command information in a way to show info for each parameter for each parameter set of a given cmdlet.
99
.PARAMETER Command
1010
The name of the command to get the parameter info for.
11-
.PARAMETER Verbose
11+
.PARAMETER VerboseOutput
1212
Switch to indicate whether parameter info is also shown for commonparameters.
1313
.EXAMPLE
1414
Get-ParamInfo Get-Command
1515
#>
1616
[CmdletBinding()]
17-
param ( [string]$Command, [switch]$Verbose)
17+
param ( [string]$Command, [switch]$VerboseOutputOutput)
1818

1919
# Use the special formatting built to output the results in a palatable way
2020
# Formatting directives
@@ -44,12 +44,10 @@ function Get-ParamInfo {
4444
$pset.parameters | foreach-object {
4545
# optionally toss the ubiquitous parameters
4646
if ( $_.Position -lt 0 ) { $p = "named" } else { $p = $_.Position }
47-
if ( !($ub -contains $_.name) -or $Verbose ) {
47+
if ( !($ub -contains $_.name) -or $VerboseOutput ) {
4848
$_ | Add-Member NoteProperty Positional $p -pass -Force |
4949
Add-Member NoteProperty ParameterSetName $pset.name -pass -Force
5050
}
5151
} | sort-object Positional | Format-Table "name", $type, $man, $pos, $vp, $vppn -auto
5252
}
53-
}
54-
55-
get-paraminfo Get-Command
53+
}

docs/Clear-Clipboard.md

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Identify the process that currently blocks the clipboard (Using GetOpenClipboard
55
Opens a small GUI offering options to either stop or restart the process
66

77
## Script file
8-
docs\Clear-Clipboard.md
8+
Clear-Clipboard\Clear-Clipboard.psm1
99

1010
## Related blog post
1111
https://powershellone.wordpress.com/2016/02/25/fix-clipboard-is-not-working-restart-process-with-powershell/
@@ -42,63 +42,3 @@ Clear-Clipboard
4242

4343

4444

45-
46-
47-
48-
49-
50-
51-
52-
53-
54-
55-
56-
57-
58-
59-
60-
61-
62-
63-
64-
65-
66-
67-
68-
69-
70-
71-
72-
73-
74-
75-
76-
77-
78-
79-
80-
81-
82-
83-
84-
85-
86-
87-
88-
89-
90-
91-
92-
93-
94-
95-
96-
97-
98-
99-
100-
101-
102-
103-
104-

docs/Get-ACEData.md

Lines changed: 2 additions & 181 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Get-ACEData
22

33
## SYNOPSIS
4+
Checkout the whole modules as it exports several more functions.
45
Queries Excel and Access files.
56

67
## Script file
7-
docs\Get-ACEData.md
8+
ACE\ACE.psm1
89

910
## SYNTAX
1011

@@ -127,183 +128,3 @@ v1.0 - Chad Miller - 4/21/2011 - Initial release
127128
128129
129130
130-
131-
132-
133-
134-
135-
136-
137-
138-
139-
140-
141-
142-
143-
144-
145-
146-
147-
148-
149-
150-
151-
152-
153-
154-
155-
156-
157-
158-
159-
160-
161-
162-
163-
164-
165-
166-
167-
168-
169-
170-
171-
172-
173-
174-
175-
176-
177-
178-
179-
180-
181-
182-
183-
184-
185-
186-
187-
188-
189-
190-
191-
192-
193-
194-
195-
196-
197-
198-
199-
200-
201-
202-
203-
204-
205-
206-
207-
208-
209-
210-
211-
212-
213-
214-
215-
216-
217-
218-
219-
220-
221-
222-
223-
224-
225-
226-
227-
228-
229-
230-
231-
232-
233-
234-
235-
236-
237-
238-
239-
240-
241-
242-
243-
244-
245-
246-
247-
248-
249-
250-
251-
252-
253-
254-
255-
256-
257-
258-
259-
260-
261-
262-
263-
264-
265-
266-
267-
268-
269-
270-
271-
272-
273-
274-
275-
276-
277-
278-
279-
280-
281-
282-
283-
284-
285-
286-
287-
288-
289-
290-
291-
292-
293-
294-
295-
296-
297-
298-
299-
300-
301-
302-
303-
304-
305-
306-
307-
308-
309-

0 commit comments

Comments
 (0)