Update the comment based help text

This commit is contained in:
Markus Fleschutz 2021-10-12 21:51:51 +02:00
parent acc88e247d
commit 27bd366394
53 changed files with 112 additions and 97 deletions

View File

@ -1,12 +1,13 @@
## add-firewall-rules.ps1 - Adds firewall rules for the given executables (needs admin rights)
## add-firewall-rules.ps1 - Adds firewall rules for executables (needs admin rights)
add-firewall-rules.ps1 [<PathToExecutables>]
This script adds firewall rules for the given executable. Administrator rights are required.
## Parameters
```powershell
add-firewall-rules.ps1 [[-PathToExecutables] <String>] [<CommonParameters>]
-PathToExecutables <String>
Specifies the path to the executables
Required? false
Position? 1

View File

@ -1,12 +1,13 @@
## add-memo.ps1 - Adds a memo to Memos.csv in the home folder
## add-memo.ps1 - Adds a memo text to $HOME/Memos.csv
add-memo.ps1 [<text>]
This script adds the given memo text to $HOME/Memos.csv.
## Parameters
```powershell
add-memo.ps1 [[-text] <String>] [<CommonParameters>]
-text <String>
Specifies the text to memorize
Required? false
Position? 1

View File

@ -1,12 +1,13 @@
## alert.ps1 - Handle and escalate the given alert message
## alert.ps1 - Handles and escalates an alert
alert.ps1 [<message>]
This script handles and escalates the given alert message.
## Parameters
```powershell
alert.ps1 [[-Message] <String>] [<CommonParameters>]
-Message <String>
Specifies the alert message
Required? false
Position? 1

View File

@ -1,13 +1,13 @@
## build-repo.ps1 - Builds a Git repository
Supports building with cmake, configure, autogen, Imakefile and Makefile.
This scripts supports building with cmake, configure, autogen, Imakefile and Makefile.
## Parameters
```powershell
build-repo.ps1 [[-RepoDir] <String>] [<CommonParameters>]
-RepoDir <String>
Specifies the path to the Git repository.
Specifies the path to the Git repository
Required? false
Position? 1

View File

@ -1,6 +1,6 @@
## build-repos.ps1 - Builds all Git repositories in a folder
build-repos.ps1 [<ParentDir>]
This script builds all Git repositories in a given folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-desktop.ps1 - Change the working directory to the user's desktop folder
## cd-desktop.ps1 - Sets the working directory to the user's desktop folder
cd-desktop.ps1
This script changes the working directory to the user's desktop folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-docs.ps1 - Change the working directory to the user's documents folder
## cd-docs.ps1 - Sets the working directory to the user's documents folder
cd-docs.ps1
This scripts changes the working directory to the user's documents folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-downloads.ps1 - Change the working directory to the user's downloads folder
## cd-downloads.ps1 - Sets the working directory to the user's downloads folder
cd-downloads.ps1
This script changes the working directory to the user's downloads folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-dropbox.ps1 - Change the working directory to the user's Dropbox folder
## cd-dropbox.ps1 - Sets the working directory to the user's Dropbox folder
cd-dropbox.ps1
This script changes the working directory to the user's Dropbox folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-home.ps1 - Change the working directory to the user's home directory
## cd-home.ps1 - Sets the working directory to the user's home directory
cd-home.ps1
This script changes the working directory to the user's home directory.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-music.ps1 - Change the working directory to the user's music folder
## cd-music.ps1 - Sets the working directory to the user's music folder
cd-music.ps1
This script changes the working directory to the user's music folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-onedrive.ps1 - Change the working directory to the user's OneDrive folder
## cd-onedrive.ps1 - Sets the working directory to the user's OneDrive folder
cd-onedrive.ps1
This script changes the working directory to the user's OneDrive folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-pics.ps1 - Change the working directory to the user's pictures folder
## cd-pics.ps1 - Sets the working directory to the user's pictures folder
cd-pics.ps1
This script changes the working directory to the user's pictures folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-repos.ps1 - Change the working directory to the user's Git repositories folder
## cd-repos.ps1 - Sets the working directory to the user's Git repositories folder
cd-repos.ps1
This script changes the working directory to the user's Git repositories folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-root.ps1 - Change the working directory to the root directory (C:\ on Windows)
## cd-root.ps1 - Sets the working directory to the root directory (C:\ on Windows)
cd-root.ps1
This script changes the working directory to the root directory (C:\ on Windows).
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-scripts.ps1 - Change the working directory to the PowerShell scripts folder
## cd-scripts.ps1 - Sets the working directory to the PowerShell scripts folder
cd-scripts.ps1
This script changes the working directory to the PowerShell scripts folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-ssh.ps1 - Change the working directory to the user's SSH folder
## cd-ssh.ps1 - Sets the working directory to the user's SSH folder
cd-ssh.ps1
This script changes the working directory to the user's SSH folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-up.ps1 - Change the working directory to one level up
## cd-up.ps1 - Sets the working directory to one level up
cd-up.ps1
This script changes the working directory to one directory level up.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-up2.ps1 - Change the working directory to two directory levels up
## cd-up2.ps1 - Sets the working directory to two directory levels up
cd-up2.ps1
This script changes the working directory to two directory level up.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-up3.ps1 - Change the working directory to three directory levels up
## cd-up3.ps1 - Sets the working directory to three directory levels up
cd-up3.ps1
This script changes the working directory to three directory levels up.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-up4.ps1 - Change the working directory to four directory levels up
## cd-up4.ps1 - Sets the working directory to four directory levels up
cd-up4.ps1
This script changes the working directory to four directory levels up.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## cd-videos.ps1 - Change the working directory to the user's videos folder
## cd-videos.ps1 - Sets the working directory to the user's videos folder
cd-videos.ps1
This script changes the working directory to the user's videos folder.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## check-cpu-temp.ps1 - Checks the CPU temperature
check-cpu-temp.ps1
This script checks the CPU temperature.
## Parameters
```powershell

View File

@ -1,6 +1,6 @@
## check-dns-resolution.ps1 - Checks the DNS resolution with frequently used domain names
check-dns-resolution.ps1
This script checks the DNS resolution with frequently used domain names.
## Parameters
```powershell

View File

@ -1,12 +1,13 @@
## check-drive-space.ps1 - Checks a drive for free space left (20 GB by default)
check-drive-space.ps1 [<drive>] [<min-level>]
This script checks a drive for free space left (20 GB by default).
## Parameters
```powershell
check-drive-space.ps1 [[-Drive] <String>] [[-MinLevel] <Int32>] [<CommonParameters>]
-Drive <String>
Specifies the drive to check
Required? false
Position? 1
@ -15,6 +16,7 @@ check-drive-space.ps1 [[-Drive] <String>] [[-MinLevel] <Int32>] [<CommonParamete
Accept wildcard characters? false
-MinLevel <Int32>
Specifies the minimum level in Gigabyte
Required? false
Position? 2

View File

@ -30,7 +30,7 @@ export-to-manuals.ps1 [[-FilePattern] <String>] [[-TargetDir] <String>] [<Common
## Example
```powershell
PS>./export-to-manuals.ps1
Found 264 scripts, starting export to /home/markus/PowerShell/Docs...
Found 264 scripts, exporting to /home/markus/PowerShell/Docs...
✔️ exported 264 scripts as manuals in 28 sec
```

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Adds firewall rules for the given executables (needs admin rights)
Adds firewall rules for executables (needs admin rights)
.DESCRIPTION
add-firewall-rules.ps1 [<PathToExecutables>]
This script adds firewall rules for the given executable. Administrator rights are required.
.PARAMETER PathToExecutables
Specifies the path to the executables
.EXAMPLE
PS> ./add-firewall-rules C:\MyApp\bin
Adding firewall rule for C:\MyApp\bin\app1.exe

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Adds a memo to Memos.csv in the home folder
Adds a memo text to $HOME/Memos.csv
.DESCRIPTION
add-memo.ps1 [<text>]
This script adds the given memo text to $HOME/Memos.csv.
.PARAMETER text
Specifies the text to memorize
.EXAMPLE
PS> ./add-memo "Buy apples"
added to 📄/home/markus/Memos.csv

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Handle and escalate the given alert message
Handles and escalates an alert
.DESCRIPTION
alert.ps1 [<message>]
This script handles and escalates the given alert message.
.PARAMETER message
Specifies the alert message
.EXAMPLE
PS> ./alert "Harddisk failure"
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
Builds a Git repository
.DESCRIPTION
Supports building with cmake, configure, autogen, Imakefile and Makefile.
This scripts supports building with cmake, configure, autogen, Imakefile and Makefile.
.PARAMETER RepoDir
Specifies the path to the Git repository.
Specifies the path to the Git repository
.EXAMPLE
PS> ./build-repo C:\MyRepo
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Builds all Git repositories in a folder
.DESCRIPTION
build-repos.ps1 [<ParentDir>]
This script builds all Git repositories in a given folder.
.PARAMETER ParentDir
Specifies the path to the folder containing the Git repositories
.EXAMPLE

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's desktop folder
Sets the working directory to the user's desktop folder
.DESCRIPTION
cd-desktop.ps1
This script changes the working directory to the user's desktop folder.
.EXAMPLE
PS> ./cd-desktop
📂/home/markus/Desktop

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's documents folder
Sets the working directory to the user's documents folder
.DESCRIPTION
cd-docs.ps1
This scripts changes the working directory to the user's documents folder.
.EXAMPLE
PS> ./cd-docs
📂/home/markus/Documents

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's downloads folder
Sets the working directory to the user's downloads folder
.DESCRIPTION
cd-downloads.ps1
This script changes the working directory to the user's downloads folder.
.EXAMPLE
PS> ./cd-downloads
📂/home/markus/Downloads

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's Dropbox folder
Sets the working directory to the user's Dropbox folder
.DESCRIPTION
cd-dropbox.ps1
This script changes the working directory to the user's Dropbox folder.
.EXAMPLE
PS> ./cd-dropbox
📂/home/markus/Dropbox

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's home directory
Sets the working directory to the user's home directory
.DESCRIPTION
cd-home.ps1
This script changes the working directory to the user's home directory.
.EXAMPLE
PS> ./cd-home
📂/home/markus

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's music folder
Sets the working directory to the user's music folder
.DESCRIPTION
cd-music.ps1
This script changes the working directory to the user's music folder.
.EXAMPLE
PS> ./cd-music
📂/home/markus/Music

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's OneDrive folder
Sets the working directory to the user's OneDrive folder
.DESCRIPTION
cd-onedrive.ps1
This script changes the working directory to the user's OneDrive folder.
.EXAMPLE
PS> ./cd-onedrive
📂/home/markus/OneDrive

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's pictures folder
Sets the working directory to the user's pictures folder
.DESCRIPTION
cd-pics.ps1
This script changes the working directory to the user's pictures folder.
.EXAMPLE
PS> ./cd-pics
📂/home/markus/Pictures

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's recycle bin folder
Sets the working directory to the user's recycle bin folder
.DESCRIPTION
cd-recycle-bin.ps1
This script changes the working directory to the user's recycle bin folder.
.EXAMPLE
PS> ./cd-recycle-bin
📂C:\$Recycle.Bin\S-1-5-21-123404-23309-294260-1001

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's Git repositories folder
Sets the working directory to the user's Git repositories folder
.DESCRIPTION
cd-repos.ps1
This script changes the working directory to the user's Git repositories folder.
.EXAMPLE
PS> ./cd-repos
📂/home/markus/Repos

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the root directory (C:\ on Windows)
Sets the working directory to the root directory (C:\ on Windows)
.DESCRIPTION
cd-root.ps1
This script changes the working directory to the root directory (C:\ on Windows).
.EXAMPLE
PS> ./cd-root
📂C:\

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the PowerShell scripts folder
Sets the working directory to the PowerShell scripts folder
.DESCRIPTION
cd-scripts.ps1
This script changes the working directory to the PowerShell scripts folder.
.EXAMPLE
PS> ./cd-scripts
📂/home/markus/PowerShell/Scripts

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's SSH folder
Sets the working directory to the user's SSH folder
.DESCRIPTION
cd-ssh.ps1
This script changes the working directory to the user's SSH folder.
.EXAMPLE
PS> ./cd-ssh
📂/home/markus/.ssh

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to one level up
Sets the working directory to one level up
.DESCRIPTION
cd-up.ps1
This script changes the working directory to one directory level up.
.EXAMPLE
PS> .\cd-up
(one level up)

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to two directory levels up
Sets the working directory to two directory levels up
.DESCRIPTION
cd-up2.ps1
This script changes the working directory to two directory level up.
.EXAMPLE
PS> ./cd-up2
(two levels up)

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to three directory levels up
Sets the working directory to three directory levels up
.DESCRIPTION
cd-up3.ps1
This script changes the working directory to three directory levels up.
.EXAMPLE
PS> ./cd-up3
(three levels up)

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to four directory levels up
Sets the working directory to four directory levels up
.DESCRIPTION
cd-up4.ps1
This script changes the working directory to four directory levels up.
.EXAMPLE
PS> ./cd-up4
(four levels up)

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Change the working directory to the user's videos folder
Sets the working directory to the user's videos folder
.DESCRIPTION
cd-videos.ps1
This script changes the working directory to the user's videos folder.
.EXAMPLE
PS> ./cd-videos
📂/home/markus/Videos

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Checks the CPU temperature
.DESCRIPTION
check-cpu-temp.ps1
This script checks the CPU temperature.
.EXAMPLE
PS> ./check-cpu-temp
30.3 °C CPU temperature - good

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Checks the DNS resolution with frequently used domain names
.DESCRIPTION
check-dns-resolution.ps1
This script checks the DNS resolution with frequently used domain names.
.EXAMPLE
PS> ./check-dns-resolution
11.8 domains/sec (177 domains resolved in 15 sec)

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Checks a drive for free space left (20 GB by default)
.DESCRIPTION
check-drive-space.ps1 [<drive>] [<min-level>]
This script checks a drive for free space left (20 GB by default).
.PARAMETER Drive
Specifies the drive to check
.PARAMETER MinLevel
Specifies the minimum level in Gigabyte
.EXAMPLE
PS> ./check-drive-space C
172 GB left on drive C (61 of 233 GB used)

View File

@ -5,7 +5,7 @@
This script exports the comment based help of all PowerShell scripts as manuals.
.EXAMPLE
PS> ./export-to-manuals.ps1
Found 264 scripts, starting export to /home/markus/PowerShell/Docs...
Found 264 scripts, exporting to /home/markus/PowerShell/Docs...
exported 264 scripts as manuals in 28 sec
.NOTES
Author: Markus Fleschutz · License: CC0
@ -21,7 +21,7 @@ try {
$StopWatch = [system.diagnostics.stopwatch]::startNew()
$Scripts = Get-ChildItem "$FilePattern"
"Found $($Scripts.Count) scripts, starting export to $TargetDir..."
"Found $($Scripts.Count) scripts, exporting to $TargetDir..."
foreach ($Script in $Scripts) {
& "$PSScriptRoot/convert-ps2md" "$Script" > "$TargetDir/$($Script.BaseName).md"