Update the comment based help

This commit is contained in:
Markus Fleschutz 2021-10-15 23:09:08 +02:00
parent b8189c6ba4
commit ae5a828ec2
35 changed files with 90 additions and 52 deletions

View File

@ -29,7 +29,7 @@ try {
[int]$Step = 1 [int]$Step = 1
foreach ($Folder in $Folders) { foreach ($Folder in $Folders) {
$FolderName = (get-item "$Folder").Name $FolderName = (get-item "$Folder").Name
"👉 Step $Step/$($FolderCount): Cleaning 📂$($FolderName)..." "⏳ Cleaning 📂$FolderName (step $Step/$($FolderCount))..."
& git -C "$Folder" clean -xfd -f # force + recurse into dirs + don't use the standard ignore rules & git -C "$Folder" clean -xfd -f # force + recurse into dirs + don't use the standard ignore rules
if ($lastExitCode -ne "0") { throw "'git clean -xfd -f' failed" } if ($lastExitCode -ne "0") { throw "'git clean -xfd -f' failed" }

View File

@ -17,16 +17,16 @@ try {
$StopWatch = [system.diagnostics.stopwatch]::startNew() $StopWatch = [system.diagnostics.stopwatch]::startNew()
if ($IsLinux) { if ($IsLinux) {
"Step 1/4: Fetching update infos for installed Debian packages..." "Fetching update infos for installed Debian packages (step 1/4)..."
& sudo apt update & sudo apt update
"Step 2/4: Upgrading installed Debian packages..." "Upgrading installed Debian packages (step 2/4)..."
& sudo apt upgrade --yes & sudo apt upgrade --yes
"Step 3/4: Removing obsolete Debian packages..." "Removing obsolete Debian packages (step 3/4)..."
& sudo apt autoremove --yes & sudo apt autoremove --yes
"Step 4/4: Upgrading installed Snap packages..." "Upgrading installed Snap packages (step 4/4)..."
& sudo snap refresh & sudo snap refresh
} else { } else {
"Sorry, not supported yet" "Sorry, not supported yet"

View File

@ -3,8 +3,10 @@
Lists all branches in a Git repository Lists all branches in a Git repository
.DESCRIPTION .DESCRIPTION
list-branches.ps1 [<RepoDir>] [<SearchPattern>] list-branches.ps1 [<RepoDir>] [<SearchPattern>]
<RepoDir> is the current working directory by default .PARAMETER RepoDir
<SearchPattern> is "*" (anything) by default Specifies the path to the Git repository (current working directory by default)
.PARAMETER SearchPattern
Specifies the search patter (anything by default)
.EXAMPLE .EXAMPLE
PS> ./list-branches PS> ./list-branches
.NOTES .NOTES

View File

@ -1,8 +1,8 @@
<# <#
.SYNOPSIS .SYNOPSIS
Lists all local drives. Lists all local drives
.DESCRIPTION .DESCRIPTION
list-drives.ps1 This script lists the details of all local drives.
.EXAMPLE .EXAMPLE
PS> ./list-drives PS> ./list-drives

View File

@ -3,7 +3,6 @@
Lists major earthquakes for the last 30 days Lists major earthquakes for the last 30 days
.DESCRIPTION .DESCRIPTION
Lists earthquakes with magnitude >= 6.0 for the last 30 days Lists earthquakes with magnitude >= 6.0 for the last 30 days
list-earthquakes.ps1
.EXAMPLE .EXAMPLE
PS> ./list-earthquakes PS> ./list-earthquakes
.NOTES .NOTES

View File

@ -2,8 +2,9 @@
.SYNOPSIS .SYNOPSIS
Lists empty subfolders within a directory tree Lists empty subfolders within a directory tree
.DESCRIPTION .DESCRIPTION
list-empty-dirs.ps1 [<DirTree>] This script scans and lists all empty subfolders within the given directory tree.
<DirTree> is the path to the directory tree .PARAMETER DirTree
Specifies the path to the directory tree
.EXAMPLE .EXAMPLE
PS> ./list-empty-dirs C:\ PS> ./list-empty-dirs C:\
.NOTES .NOTES

View File

@ -2,8 +2,9 @@
.SYNOPSIS .SYNOPSIS
Lists empty files within a directory tree Lists empty files within a directory tree
.DESCRIPTION .DESCRIPTION
list-empty-files.ps1 [<DirTree>] This script scans and lists all empty files within the given directory tree.
<DirTree> is the path to the directory tree .PARAMETER DirTree
Specifies the path to the directory tree
.EXAMPLE .EXAMPLE
PS> ./list-empty-files C:\ PS> ./list-empty-files C:\
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all environment variables Lists all environment variables
.DESCRIPTION .DESCRIPTION
list-environment-variables.ps1 This script lists all environment variables.
.EXAMPLE .EXAMPLE
PS> ./list-environment-variables PS> ./list-environment-variables

View File

@ -3,7 +3,8 @@
Lists the exchange rates for a currency Lists the exchange rates for a currency
.DESCRIPTION .DESCRIPTION
Lists the current exchange rates for the given currency (USD per default). Lists the current exchange rates for the given currency (USD per default).
list-exchange-rates.ps1 [<currency>] .PARAMETER currency
Specifies the base currency
.EXAMPLE .EXAMPLE
PS> ./list-exchange-rates EUR PS> ./list-exchange-rates EUR
.NOTES .NOTES

View File

@ -2,8 +2,9 @@
.SYNOPSIS .SYNOPSIS
Lists all files in a directory tree Lists all files in a directory tree
.DESCRIPTION .DESCRIPTION
list-files.ps1 [<DirTree>] This script lists all files within the given directory tree.
<DirTree> is the path to the directory tree .PARAMETER DirTree
Specifies the path to the directory tree
.EXAMPLE .EXAMPLE
PS> ./list-files C:\ PS> ./list-files C:\
.NOTES .NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS .SYNOPSIS
Lists the phone calls of the FRITZ!Box device Lists the phone calls of the FRITZ!Box device
.DESCRIPTION .DESCRIPTION
list-fritzbox-calls.ps1 [<Username>] [<Password>] This script lists the phone calls of the FRITZ!Box device.
.PARAMETER Username
Specifies the user name for FRITZ!Box
.PARAMETER Password
Specifies the password to FRITZ!Box
.EXAMPLE .EXAMPLE
PS> ./list-fritzbox-calls PS> ./list-fritzbox-calls
.NOTES .NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS .SYNOPSIS
Lists FRITZ!Box's known devices Lists FRITZ!Box's known devices
.DESCRIPTION .DESCRIPTION
list-fritzbox-devices.ps1 [<Username>] [<Password>] This script lists FRITZ!Box's known devices.
.PARAMETER Username
Specifies the user name to FRITZ!Box
.PARAMETER Password
Specifies the password to FRITZ!Box
.EXAMPLE .EXAMPLE
PS> ./list-fritzbox-devices PS> ./list-fritzbox-devices
.NOTES .NOTES

View File

@ -2,8 +2,9 @@
.SYNOPSIS .SYNOPSIS
Lists hidden files in a directory tree Lists hidden files in a directory tree
.DESCRIPTION .DESCRIPTION
list-hidden-files.ps1 [<DirTree>] This script scans and lists all hidden files in a directory tree.
<DirTree> is the path to the directory tree .PARAMETER DirTree
Specifies the path to the directory tree
.EXAMPLE .EXAMPLE
PS> ./list-hidden-files C:\ PS> ./list-hidden-files C:\
.NOTES .NOTES

View File

@ -2,8 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists the installed apps Lists the installed apps
.DESCRIPTION .DESCRIPTION
Lists the installed apps (from Windows Store or snaps). This script lists the installed apps (from Windows Store or snaps).
list-installed-apps.ps1
.EXAMPLE .EXAMPLE
PS> ./list-installed-apps PS> ./list-installed-apps
.NOTES .NOTES

View File

@ -2,7 +2,9 @@
.SYNOPSIS .SYNOPSIS
Lists the latests tags in all Git repositories in a folder Lists the latests tags in all Git repositories in a folder
.DESCRIPTION .DESCRIPTION
list-latest-tags.ps1 [<ParentDir>] This script lists the latest tags in all Git repositories in the specified folder.
.PARAMETER ParentDir
Specifies the path to the parent folder
.EXAMPLE .EXAMPLE
PS> ./list-latest-tags C:\MyRepos PS> ./list-latest-tags C:\MyRepos
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all memos in $HOME/Memos.csv Lists all memos in $HOME/Memos.csv
.DESCRIPTION .DESCRIPTION
list-memos.ps1 This script lists all memo entries in Memos.csv in the home folder.
.EXAMPLE .EXAMPLE
PS> ./list-memos PS> ./list-memos
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all PowerShell modules Lists all PowerShell modules
.DESCRIPTION .DESCRIPTION
list-modules.ps1 This script lists all installed PowerShell modules.
.EXAMPLE .EXAMPLE
PS> ./list-modules PS> ./list-modules

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all tables of a MySQL database Lists all tables of a MySQL database
.DESCRIPTION .DESCRIPTION
list-mysql-tables.ps1 This script lists all tables of the given MySQL database.
.EXAMPLE .EXAMPLE
PS> ./list-mysql-tables PS> ./list-mysql-tables
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all network shares of the local computer Lists all network shares of the local computer
.DESCRIPTION .DESCRIPTION
list-network-shares.ps1 This script lists all network shares of the local computer.
.EXAMPLE .EXAMPLE
PS> ./list-network-shares PS> ./list-network-shares

View File

@ -2,7 +2,11 @@
.SYNOPSIS .SYNOPSIS
Lists the latest news Lists the latest news
.DESCRIPTION .DESCRIPTION
list-news.ps1 [<RSS-URL>] [<max-count>] This script lists the latest RSS feed news.
.PARAMETER RSS_URL
Specifies the URL to the RSS feed
.PARAMETER MaxCount
Specifies the number of news to list
.EXAMPLE .EXAMPLE
PS> ./list-news PS> ./list-news
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists OS releases and download URL Lists OS releases and download URL
.DESCRIPTION .DESCRIPTION
list-os-releases.ps1 This script lists OS releases and download URL.
.EXAMPLE .EXAMPLE
PS> ./list-os-releases PS> ./list-os-releases
.NOTES .NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS .SYNOPSIS
Lists the latest operating system updates Lists the latest operating system updates
.DESCRIPTION .DESCRIPTION
list-os-updates.ps1 [<RSS-URL>] [<max-count>] This script lists the latest operating system update news.
.PARAMETER RSS_URL
Specifies the URL to the RSS feed
.PARAMETER MaxCount
Specifies the number of news to list
.EXAMPLE .EXAMPLE
PS> ./list-os-updates PS> ./list-os-updates
.NOTES .NOTES

View File

@ -1,8 +1,14 @@
<# <#
.SYNOPSIS .SYNOPSIS
Prints a list of random passwords Lists random passwords
.DESCRIPTION .DESCRIPTION
list-passwords.ps1 [<PasswordLength>] [<Columns>] [<Rows>] This script lists random passwords.
.PARAMETER PasswordLength
Specifies the length of the password
.PARAMETER Columns
Specifies the number of columns
.PARAMETER Rows
Specifies the number of rows
.EXAMPLE .EXAMPLE
PS> ./list-passwords PS> ./list-passwords
.NOTES .NOTES

View File

@ -1,8 +1,14 @@
<# <#
.SYNOPSIS .SYNOPSIS
Prints a list of random PIN's Lists random PIN's
.DESCRIPTION .DESCRIPTION
list-pins.ps1 [<PinLength>] [<Columns>] [<Rows>] This script lists random PIN's.
.PARAMETER PinLength
Specifies the PIN length
.PARAMETER Columns
Specifies the number of columns
.PARAMETER Rows
Specifies the number of rows
.EXAMPLE .EXAMPLE
PS> ./list-pins PS> ./list-pins
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all jobs of all printers Lists all jobs of all printers
.DESCRIPTION .DESCRIPTION
list-print-jobs.ps1 This script lists all print jobs of all printer devices.
.EXAMPLE .EXAMPLE
PS> ./list-print-jobs PS> ./list-print-jobs
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all printers known to the local computer Lists all printers known to the local computer
.DESCRIPTION .DESCRIPTION
list-printers.ps1 This script lists all printers known to the local computer.
.EXAMPLE .EXAMPLE
PS> ./list-printers PS> ./list-printers
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all local computer processes Lists all local computer processes
.DESCRIPTION .DESCRIPTION
list-processes.ps1 This script lists all local computer processes.
.EXAMPLE .EXAMPLE
PS> ./list-processes PS> ./list-processes

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists the user's PowerShell profiles Lists the user's PowerShell profiles
.DESCRIPTION .DESCRIPTION
list-profiles.ps1 This script lists the user's PowerShell profiles.
.EXAMPLE .EXAMPLE
PS> ./list-profiles PS> ./list-profiles

View File

@ -2,7 +2,9 @@
.SYNOPSIS .SYNOPSIS
Lists the details of all Git repositories in a folder Lists the details of all Git repositories in a folder
.DESCRIPTION .DESCRIPTION
list-repos.ps1 [<ParentDir>] This script lists the details of all Git repositories in the given folder.
.PARAMETER ParentDir
Specifies the path to the parent folder.
.EXAMPLE .EXAMPLE
PS> ./list-repos C:\MyRepos PS> ./list-repos C:\MyRepos

View File

@ -2,8 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all PowerShell scripts in this repository Lists all PowerShell scripts in this repository
.DESCRIPTION .DESCRIPTION
Lists all PowerShell scripts in this repository (sorted alphabetically) This script lists all PowerShell scripts in the repository (sorted alphabetically).
list-scripts.ps1
.EXAMPLE .EXAMPLE
PS> ./list-scripts PS> ./list-scripts
.NOTES .NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists the local computer services Lists the local computer services
.DESCRIPTION .DESCRIPTION
list-services.ps1 This script lists all local computer services.
.EXAMPLE .EXAMPLE
PS> ./list-services PS> ./list-services

View File

@ -2,8 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all tables of a SQL server database Lists all tables of a SQL server database
.DESCRIPTION .DESCRIPTION
Lists all tables in a SQL server database and exports the list as CSV Lists all tables in a SQL server database and exports the list as CSV.
Install-Module InvokeQuery Install-Module InvokeQuery
Run the above command if you do not have this module. Run the above command if you do not have this module.
.EXAMPLE .EXAMPLE

View File

@ -2,8 +2,9 @@
.SYNOPSIS .SYNOPSIS
Lists the submodules of a Git repository Lists the submodules of a Git repository
.DESCRIPTION .DESCRIPTION
list-submodules.ps1 [<RepoDir>] This script lists the submodules of the given Git repository.
<RepoDir> is the path to the repository (current working dir by default) .PARAMETER RepoDir
Specifies the path to the repository (current working dir by default)
.EXAMPLE .EXAMPLE
PS> ./list-submodules C:\MyRepo PS> ./list-submodules C:\MyRepo
.NOTES .NOTES

View File

@ -2,9 +2,11 @@
.SYNOPSIS .SYNOPSIS
Lists all tags in a Git repository Lists all tags in a Git repository
.DESCRIPTION .DESCRIPTION
list-tags.ps1 [<RepoDir>] [<SearchPattern>] This script lists all tags in the given Git repository.
<RepoDir> is the path to the Git repository .PARAMETER RepoDir
<SearchPattern> is "*" (anything) by default Specifies the path to the Git repository
.PARAMETER SearchPattern
Specifies the search pattern (anything by default)
.EXAMPLE .EXAMPLE
PS> ./list-tags C:\MyRepo PS> ./list-tags C:\MyRepo

View File

@ -2,7 +2,7 @@
.SYNOPSIS .SYNOPSIS
Lists all Windows scheduler tasks Lists all Windows scheduler tasks
.DESCRIPTION .DESCRIPTION
list-tasks.ps1 This script lists all Windows scheduler tasks.
.EXAMPLE .EXAMPLE
PS> ./list-tasks PS> ./list-tasks