Update the comment based help

This commit is contained in:
Markus Fleschutz
2021-10-16 16:50:10 +02:00
parent c296024b8f
commit 73037be877
305 changed files with 820 additions and 474 deletions

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Checks the file system of a drive (needs admin rights)
.DESCRIPTION
check-file-system.ps1 [<drive>]
This script checks the file system of a drive. It needs admin rights.
.PARAMETER Drive
Specifies the drive to check
.EXAMPLE
PS> ./check-file-system C
✔️ file system on drive C is clean

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Checks the health of the local computer
.DESCRIPTION
check-health.ps1
This script checks the health of the local computer.
.EXAMPLE
PS> ./check-health
✔️ 1213 GB left for swap space (67 of 1280 GB used)

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Checks the given IPv4 address for validity
Checks an IPv4 address for validity
.DESCRIPTION
check-ipv4-address.ps1 [<Address>]
This script checks the given IPv4 address for validity.
.PARAMETER Address
Specifies the IPv4 address to check
.EXAMPLE
PS> ./check-ipv4-address 192.168.11.22
✔️ IPv4 192.168.11.22 is valid

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Checks the given IPv6 address for validity
Checks an IPv6 address for validity
.DESCRIPTION
check-ipv6-address.ps1 [<Address>]
This script checks the given IPv6 address for validity
.PARAMETER Address
Specifies the IPv6 address to check
.EXAMPLE
PS> ./check-ipv6-address fe80::200:5aee:feaa:20a2
✔️ IPv6 fe80::200:5aee:feaa:20a2 is valid

View File

@ -2,8 +2,10 @@
.SYNOPSIS
Checks the given MAC address for validity
.DESCRIPTION
This script checks the given MAC address for validity
Supported MAC address formats are: 00:00:00:00:00:00 or 00-00-00-00-00-00 or 000000000000.
check-mac-address.ps1 [<MAC>]
.PARAMETER MAC
Specifies the MAC address to check
.EXAMPLE
PS> ./check-mac-address 11:22:33:44:55:66
✔️ MAC address 11:22:33:44:55:66 is valid

View File

@ -2,8 +2,10 @@
.SYNOPSIS
Checks the ping latency from the local computer to selected Internet hosts
.DESCRIPTION
Hosts by default are: amazon.com,apple.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com
check-ping.ps1 [<hosts>]
This script checks the ping latency from the local computer to selected Internet hosts.
The hosts by default are: amazon.com,apple.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com
.PARAMETER hosts
Specifies the hosts to check (separated by comma)
.EXAMPLE
PS> ./check-ping
✔️ 36 ms ping average (13 ms min, 109 ms max, 10 hosts)

View File

@ -2,9 +2,10 @@
.SYNOPSIS
Performs a selftest on your S.M.A.R.T. HDD/SSD devices.
.DESCRIPTION
check-smart-devices.ps1 [<type>]
Type is either short(default) or long.
Requires smartctl (smartmontools package) and admin rights.
This script performs a selftest on your S.M.A.R.T. HDD/SSD devices.
It requires smartctl (smartmontools package) and admin rights.
.PARAMETER type
Specifies the type of selftest: either short (default) or long
.EXAMPLE
PS> ./check-smart-devices
✔️ short selftest started on S.M.A.R.T. device /dev/sda

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Checks the given subnet mask for validity
.DESCRIPTION
check-subnet-mask.ps1 [<address>]
This script checks the given subnet mask for validity.
.PARAMETER address
Specifies the subnet mask to check
.EXAMPLE
PS> ./check-subnet-mask 255.255.255.0
✔️ subnet mask 255.255.255.0 is valid

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Checks the free swap space
.DESCRIPTION
check-swap-space.ps1 [<min-level>]
This script checks the free swap space.
.PARAMETER MinLevel
Specifies the minimum level (50 GB by default)
.EXAMPLE
PS> ./check-swap-space
✔️ 1213 GB left for swap space (67 of 1280 GB used)

View File

@ -2,8 +2,10 @@
.SYNOPSIS
Checks every symlink in a folder (including subfolders)
.DESCRIPTION
check-symlinks.ps1 [<folder>]
This script checks every symlink in a folder (including subfolders).
Returns the number of broken symlinks as exit value.
.PARAMETER folder
Specifies the path to the directory tree
.EXAMPLE
PS> ./check-symlinks .
✔️ 0 out of 10 symlinks are broken in 📂/home/markus

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Checks the weather for critical values
.DESCRIPTION
check-weather.ps1 [<location>]
Checks the current weather for critical values.
.PARAMETER location
Specifies the location to use (determined automatically per default)
.EXAMPLE
PS> ./check-weather
.LINK

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Checks the validity of the Windows system files (requires admin rights)
.DESCRIPTION
check-windows-system-files.ps1
This script checks the validity of the Windows system files. It requires admin rights.
.EXAMPLE
PS> ./check-windows-system-files
✔️ checked Windows system files

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Checks the given XML file for validity
.DESCRIPTION
check-xml-file [<file>]
This script checks the given XML file for validity.
.PARAMETER file
Specifies the path to the XML file to check
.EXAMPLE
PS> ./check-xml-file myfile.xml
✔️ XML file is valid

View File

@ -2,10 +2,12 @@
.SYNOPSIS
Cleans a Git repository from untracked files (including submodules)
.DESCRIPTION
clean-repo.ps1 [<RepoDir>]
This script cleans a Git repository from untracked files (including submodules).
.PARAMETER RepoDir
Specifies the path to the Git repository
.EXAMPLE
PS> ./clean-repo C:\MyRepo
🧹 Cleaning Git repository 📂C:\MyRepo from untracked files...
🧹 Cleaning from untracked files...
✔️ cleaned Git repository 📂C:\MyRepo in 0 sec
.NOTES
Author: Markus Fleschutz · License: CC0
@ -21,7 +23,7 @@ try {
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
$RepoDirName = (get-item "$RepoDir").Name
"🧹 Cleaning Git repository 📂$RepoDirName from untracked files..."
"🧹 Cleaning untracked files..."
$Null = (git --version)
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Cleans all Git repositories in a folder from untracked files (including submodules)
.DESCRIPTION
clean-repos.ps1 [<ParentDir>]
This script cleans all Git repositories in a folder from untracked files (including submodules).
.PARAMETER ParentDir
Specifies the path to the parent folder
.EXAMPLE
PS> ./clean-repos C:\MyRepos
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Removes the content of the recycle bin folder permanently
.DESCRIPTION
clear-recycle-bin.ps1
This script removes the content of the recycle bin folder permanently.
NOTE: can not be undo!
.EXAMPLE
PS> ./clear-recycle-bin

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Clones well-known Git repositories into a folder
.DESCRIPTION
clone-repos.ps1 [<folder>]
This script clones well-known Git repositories into a folder.
.PARAMETER folder
Specifies the target folder
.EXAMPLE
PS> ./clone-repos C:\Users\Markus\Repos
.NOTES

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Closes the calculator program gracefully
Closes the calculator program
.DESCRIPTION
close-calculator.ps1
This script closes the calculator program gracefully.
.EXAMPLE
PS> ./close-calculator
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes the Google Chrome Web browser
.DESCRIPTION
close-chrome.ps1
This script closes the Google Chrome Web browser gracefully.
.EXAMPLE
PS> ./close-chrome
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes Microsoft's Cortana application
.DESCRIPTION
close-cortana.ps1
This script closes Microsoft's Cortana application gracefully.
.EXAMPLE
PS> ./close-cortana
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes Microsoft's Edge Web browser
.DESCRIPTION
close-edge.ps1
This script closes Microsoft's Edge Web browser gracefully.
.EXAMPLE
PS> ./close-edge
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes Microsoft's File Explorer
.DESCRIPTION
close-file-explorer.ps1
This script closes Microsoft's File Explorer gracefully.
.EXAMPLE
PS> ./close-file-explorer
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes Mozilla's Firefox Web browser
.DESCRIPTION
close-firefox.ps1
This script closes Mozilla's Firefox Web browser gracefully.
.EXAMPLE
PS> ./close-firefox
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes the Netflix application
.DESCRIPTION
close-netflix.ps1
This script closes the Netflix application gracefully.
.EXAMPLE
PS> ./close-netflix
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes Microsoft's OneDrive folder
.DESCRIPTION
close-onedrive.ps1
This script closes Microsoft's OneDrive folder gracefully.
.EXAMPLE
PS> ./close-onedrive
.NOTES

View File

@ -1,8 +1,14 @@
<#
.SYNOPSIS
Closes the processes of the given program gracefully
Closes a program's processes
.DESCRIPTION
close-program.ps1 [<FullProgramName>] [<ProgramName>] [<ProgramAliasName>]
This script closes a program's processes gracefully.
.PARAMETER FullProgramName
Specifies the full program name
.PARAMETER ProgramName
Specifies the program name
.PARAMETER ProgramAliasName
Specifies the program alias name
.EXAMPLE
PS> ./close-program "Google Chrome" "chrome.exe"
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes the System Settings window
.DESCRIPTION
close-system-settings.ps1
This script closes the System Settings window gracefully.
.EXAMPLE
PS> ./close-system-settings
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes Mozilla's Thunderbird email client
.DESCRIPTION
close-thunderbird.ps1
This script closes Mozilla's Thunderbird email client gracefully.
.EXAMPLE
PS> ./close-thunderbird
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Closes the VLC media player application
.DESCRIPTION
close-vlc.ps1
This script closes the VLC media player application gracefully.
.EXAMPLE
PS> ./close-vlc
.NOTES

View File

@ -2,9 +2,10 @@
.SYNOPSIS
Closes the Windows Terminal application
.DESCRIPTION
close-windows-terminal.ps1
This script closes the Windows Terminal application gracefully.
.EXAMPLE
PS> ./close-windows-terminal
(Windows Terminal is closed)
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,7 +2,13 @@
.SYNOPSIS
Configures the user settings for Git
.DESCRIPTION
configure-git.ps1 [<full-name>] [<email-address>] [<favorite-editor>]
This script configures the user settings for Git.
.PARAMETER FullName
Specifies the user's full name
.PARAMETER EmailAddress
Specifies the user's email address
.PARAMETER FavoriteEditor
Specifies the user's favorite text editor
.EXAMPLE
PS> ./configure-git
.NOTES
@ -18,11 +24,11 @@ try {
if ($EmailAddress -eq "") { $EmailAddress = read-host "Enter your e-mail address"}
if ($FavoriteEditor -eq "") { $FavoriteEditor = read-host "Enter your favorite text editor (emacs,nano,vi,vim,...)" }
"👉 Step 1/3: Searching for Git executable..."
"👉 Searching for Git executable... [step 1/3]"
& git --version
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
"👉 Step 2/3: Configuring basic settings..."
"👉 Configuring basic settings... [step 2/3]"
& git config --global user.name $FullName
& git config --global user.email $EmailAddress
& git config --global core.editor $FavoriteEditor
@ -35,7 +41,7 @@ try {
& git config --global pull.rebase false
if ($lastExitCode -ne "0") { throw "'git config' failed" }
"👉 Step 3/3: Adding basic shortcuts (git st, git ls, etc.)..."
"👉 Adding basic shortcuts (git st, git ls, etc.)... [step 3/3]"
& git config --global alias.co "checkout"
& git config --global alias.br "branch"
& git config --global alias.ci "commit"

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Converts a .CSV file into a text file
.DESCRIPTION
convert-csv2txt.ps1 [<csv-file>]
This script converts a .CSV file into a text file.
.PARAMETER Path
Specifies the path to the .CSV file
.EXAMPLE
PS> ./convert-csv2txt salaries.csv
.NOTES

View File

@ -2,7 +2,17 @@
.SYNOPSIS
Convert a MySQL database table to a .CSV file
.DESCRIPTION
convert-mysql2csv.ps1 [<server>] [<database>] [<username>] [<password>] [<query>]
This script converts a MySQL database table to a .CSV file.
.PARAMETER server
Specifies the server's hostname or IP address
.PARAMETER database
Specifies the database name
.PARAMETER username
Specifies the user name
.PARAMETER password
Specifies the password
.PARAMETER query
Specifies the SQL query
.EXAMPLE
PS> ./convert-mysql2csv
.NOTES

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Converts a PowerShell script to .bat files
Converts PowerShell scripts to batch files
.DESCRIPTION
convert-ps2bat.ps1 [<pattern>]
This script converts one or more PowerShell scripts to .bat batch files.
.PARAMETER Filepattern
Specifies the file pattern
.EXAMPLE
PS> ./convert-ps2bat *.ps1
.NOTES
@ -11,7 +13,7 @@
https://github.com/fleschutz/PowerShell
#>
param([string]$Pattern = "")
param([string]$Filepattern = "")
function Convert-PowerShellToBatch
{
@ -32,9 +34,9 @@ function Convert-PowerShellToBatch
}
try {
if ($Pattern -eq "") { $Pattern = read-host "Enter path to the PowerShell script(s)" }
if ($Filepattern -eq "") { $Filepattern = read-host "Enter path to the PowerShell script(s)" }
$Files = get-childItem -path "$Pattern"
$Files = get-childItem -path "$Filepattern"
foreach ($File in $Files) {
Convert-PowerShellToBatch "$File"
}

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Converts the comment-based help of a PowerShell script to Markdown
.DESCRIPTION
convert-ps2md.ps1 [<filename>]
This script converts the comment-based help of a PowerShell script to Markdown.
.PARAMETER filename
Specifies the path to the PowerShell script
.EXAMPLE

View File

@ -2,7 +2,17 @@
.SYNOPSIS
Converts a SQL database table to a .CSV file
.DESCRIPTION
convert-sql2csv.ps1 [<server>] [<database>] [<username>] [<password>] [<query>]
This script converts a SQL database table to a .CSV file.
.PARAMETER server
Specifies the server's hostname or IP address
.PARAMETER database
Specifies the database name
.PARAMETER username
Specifies the user name
.PARAMETER password
Specifies the password
.PARAMETER query
Specifies the SQL query
.EXAMPLE
PS> ./convert-sql2csv
.NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Converts text to a .WAV audio file
.DESCRIPTION
convert-txt2wav.ps1 [<text>] [<wav-file>]
This script converts text to a .WAV audio file.
.PARAMETER text
Specifies the text to use
.PARAMETER WavFile
Specifies the path to the resulting WAV file
.EXAMPLE
PS> ./convert-txt2wav "Hello World" spoken.wav
.NOTES

View File

@ -2,8 +2,11 @@
.SYNOPSIS
Copy image files sorted by year and month
.DESCRIPTION
Copy image files from SourceDir to TargetDir sorted by year and month
copy-photos-sorted.ps1 [<SourceDir>] [<TargetDir>]
This script copies image files from SourceDir to TargetDir sorted by year and month.
.PARAMETER SourceDir
Specifies the path to the image files
.PARAMTER TargetDir
Specifies the path to the target folder
.EXAMPLE
PS> ./copy-photos-sorted D:\Mobile\DCIM C:\MyPhotoAlbum
.NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Decrypts the given file
.DESCRIPTION
decrypt-file.ps1 [<path>] [<password>]
This script decrypts the given file.
.PARAMETER Path
Specifies the path to the file to decrypt
.PARAMETER Password
Specifies the password
.EXAMPLE
PS> ./decrypt-file-rules C:\MyFile.txt "123"
.NOTES

View File

@ -3,7 +3,8 @@
Displays the current time
.DESCRIPTION
Displays the current time (for 10 seconds by default)
display-time.ps1 [<seconds>]
.PARAMETER Seconds
Specifies the number of seconds to display the time
.EXAMPLE
PS> ./display-time
.NOTES

View File

@ -1,10 +1,12 @@
<#
.SYNOPSIS
Downloads a folder (including subfolders) from the given URL
Downloads a folder (including subfolders) from an URL
.DESCRIPTION
download-dir.ps1 [<URL>]
This script downloads a folder (including subfolders) from the given URL.
.PARAMETER URL
Specifies the URL where to download from
.EXAMPLE
PS> ./download-dir "https://www.cnn.com"
PS> ./download-dir https://www.cnn.com
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -1,10 +1,12 @@
<#
.SYNOPSIS
Downloads a file from the given URL
Downloads a file from an URL
.DESCRIPTION
download-file.ps1 [<URL>]
This script downloads a file from the given URL
.PARAMETER URL
Specifies the URL where to download from
.EXAMPLE
PS> ./download-file "https://www.cnn.com/index.html"
PS> ./download-file https://www.cnn.com/index.html
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Opens the built-in text editor to edit the given file
Opens an editor to edit a file
.DESCRIPTION
edit.ps1 <filename>
Opens a text editor to edit the given file.
.PARAMETER Filename
Specifies the path to the filename
.EXAMPLE
PS> ./edit C:\MyFile.txt
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Enables the writing of crash dumps
.DESCRIPTION
enable-crash-dumps.ps1
Enables the writing of crash dumps.
.EXAMPLE
PS> ./enable-crash-dumps
.NOTES

View File

@ -2,8 +2,7 @@
.SYNOPSIS
Enables the god mode
.DESCRIPTION
Enables the god mode (adds a new icon to the desktop)
enable-god-mode.ps1
This script enables the god mode. It adds a new icon to the desktop.
.EXAMPLE
PS> ./enable-god-mode
.NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Encrypts a file
.DESCRIPTION
encrypt-file.ps1 [<Path>] [<Password>]
This script encrypts the given file.
.PARAMETER Path
Specifies the path to the file to encrypt
.PARAMETER Password
Specifies the password to use
.EXAMPLE
PS> ./encrypt-file C:\MyFile.txt "123"
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Enters a chat using a common network shared file
.DESCRIPTION
enter-chat.ps1
This script enters a chat using a common network shared file.
.EXAMPLE
PS> ./enter-chat
.NOTES

View File

@ -2,13 +2,13 @@
.SYNOPSIS
Fetches updates for a local Git repository (including submodules)
.DESCRIPTION
fetch-repo.ps1 [<RepoDir>]
This script fetches updates for a local Git repository (including submodules).
.PARAMETER RepoDir
Specifies the path to the Git repository.
.EXAMPLE
PS> ./fetch-repo
🢃 Fetching updates for Git repository 📂PowerShell ...
✔️ fetched updates for 📂PowerShell"
🢃 Fetching updates...
✔️ fetched updates for Git repository 📂PowerShell in 14 sec
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Fetches updates for all Git repositories in a folder (including submodules)
.DESCRIPTION
fetch-repos.ps1 [<ParentDir>]
This script fetches updates for all Git repositories in a folder (including submodules).
.PARAMETER ParentDir
Specifies the path to the parent folder
.EXAMPLE
PS> ./fetch-repos C:\MyRepos
.NOTES

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Prints the MD5 checksum of the given file
Prints the MD5 checksum of a file
.DESCRIPTION
get-md5.ps1 [<file>]
This script calculates and prints the MD5 checksum of the given file.
.PARAMETER file
Specifies the path to the file
.EXAMPLE
PS> ./get-md5 C:\MyFile.txt
.NOTES

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Prints the SHA1 checksum of a file
.DESCRIPTION
get-sha1.ps1 [<file>]
This script calculates and prints the SHA1 checksum of the given file.
.PARAMETER file
Specifies the path to the file
.EXAMPLE
PS> ./get-sha1 C:\MyFile.txt
.NOTES

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Prints the SHA256 checksum of a file
.DESCRIPTION
get-sha256.ps1 [<file>]
This script calculates and prints the SHA256 checksum of the given file.
.PARAMETER file
Specifies the path to the file
.EXAMPLE
PS> ./get-sha256 C:\MyFile.txt
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Enables hibernate mode for the local computer (needs admin rights)
.DESCRIPTION
hibernate.ps1
This script enables hibernate mode for the local computer. It needs admin rights.
.EXAMPLE
PS> ./hibernate
.NOTES

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Prints basic information of an executable file
.DESCRIPTION
inspect-exe.ps1 [<path-to-exe-file>]
This script prints basic information of an executable file.
.PARAMETER PathToExe
Specifies the path to the executable file
.EXAMPLE
PS> ./inspect-exe C:\MyApp.exe
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Installs GitHub CLI
.DESCRIPTION
install-github-cli.ps1
This script installs GitHub command-line interface (CLI).
.EXAMPLE
PS> ./install-github-cli
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Installs the latest Google Chrome browser
.DESCRIPTION
install-google-chrome.ps1
This script installs the latest Google Chrome Web browser.
.EXAMPLE
PS> ./install-google-chrome
.NOTES

View File

@ -2,8 +2,7 @@
.SYNOPSIS
Installs Knot Resolver (needs admin rights)
.DESCRIPTION
Knot Resolver is a DNS resolver daemon.
install-knot-resolver.ps1
This script installs Knot Resolver. Knot Resolver is a DNS resolver daemon. It needs admin rights.
.EXAMPLE
PS> ./install-knot-resolver
.NOTES
@ -17,17 +16,17 @@
try {
$StopWatch = [system.diagnostics.stopwatch]::startNew()
"👉 Step 1/4: Installing Knot Resolver..."
sudo snap install knot-resolver-gael
"👉 Installing Knot Resolver... [step 1/4]"
& sudo snap install knot-resolver-gael
"👉 Step 2/4: Copying default configuration..."
sudo cp "$PSScriptRoot/../Data/default.kresd.conf" /var/snap/knot-resolver-gael/current/kresd.conf
"👉 Copying default configuration... [step 2/4]"
& sudo cp "$PSScriptRoot/../Data/default.kresd.conf" /var/snap/knot-resolver-gael/current/kresd.conf
"👉 Step 3/4: Let user configure..."
sudo vi /var/snap/knot-resolver-gael/current/kresd.conf
"👉 Let user configure... [step 3/4]"
& sudo vi /var/snap/knot-resolver-gael/current/kresd.conf
"👉 Step 4/4: Starting Knot Resolver..."
sudo snap start knot-resolver-gael
"👉 Starting Knot Resolver... [step 4/4]"
& sudo snap start knot-resolver-gael
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
"✔️ installed Knot Resolver in $Elapsed sec"

View File

@ -2,8 +2,9 @@
.SYNOPSIS
Installs signal-cli
.DESCRIPTION
Installs signal-cli from github.com/AsamK/signal-cli. See the Web page for the correct version number
install-signal-cli.ps1 [<version>]
Installs signal-cli from github.com/AsamK/signal-cli. See the Web page for the correct version number.
.PARAMETER Version
Specifies the version to install
.EXAMPLE
PS> ./install-signal-cli 0.11.12
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Installs the SSH client (needs admin rights)
.DESCRIPTION
install-ssh-client.ps1
This script installs the SSH client (needs admin rights).
.EXAMPLE
PS> ./install-ssh-client
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Installs the SSH server (needs admin rights)
.DESCRIPTION
install-ssh-server.ps1
This script installs the SSH server (needs admin rights).
.EXAMPLE
PS> ./install-ssh-server
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Installs updates for the local machine (needs admin rights)
.DESCRIPTION
install-updates.ps1
This script installs updates for the local machine (needs admin rights).
.EXAMPLE
PS> ./install-updates
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Installs Windows Subsystem for Linux (needs admin rights)
.DESCRIPTION
install-wsl.ps1
This script installs Windows Subsystem for Linux. It needs admin rights.
.EXAMPLE
PS> ./install-wsl
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Introduces PowerShell to new users
.DESCRIPTION
introduce-powershell.ps1
This script introduces PowerShell to new users.
.EXAMPLE
PS> ./introduce-powershell
.NOTES

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Prints the geographic location of the given city
Prints the geographic location of a city
.DESCRIPTION
locate-city.ps1 [<City>]
This script prints the geographic location of the given city.
.PARAMETER City
Specifies the city to look for
.EXAMPLE
PS> ./locate-city Paris
.NOTES

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Prints the geographic location of the given IP address
Prints the geo location of the given IP address
.DESCRIPTION
locate-ipaddress.ps1 [<IPaddress>]
This script prints the geographic location of the given IP address.
.PARAMTER IPaddress
Specifies the IP address
.EXAMPLE
PS> ./locate-ipaddress 177.144.67.98
.NOTES

View File

@ -1,8 +1,12 @@
<#
.SYNOPSIS
Prints the geographic location of the given zip-code
Prints the geo location of a zip-code
.DESCRIPTION
locate-zip-code.ps1 [<CountryCode>] [<ZipCode>]
This script prints the geographic location of the given zip-code.
.PARAMETER CountryCode
Specifies the country code
.PARAMETER ZipCode
Specifies the zip code
.EXAMPLE
PS> ./locate-zip-code
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Copies newer EXE's + DLL's from the build directory to the installation directory
.DESCRIPTION
make-install.ps1 <BuildDir>
This script copies newer EXE's + DLL's from the build directory to the installation directory.
.EXAMPLE
PS> ./make-install
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Prints the current moon phase
.DESCRIPTION
moon.ps1
This script prints the current moon phase.
.EXAMPLE
PS> ./moon
.NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Creates and switches to a new branch in a Git repository
.DESCRIPTION
new-branch.ps1 [<BranchName>] [<RepoDir>]
This script creates and switches to a new branch in a Git repository.
.PARAMETER BranchName
Specifies the branch name
.PARAMETER RepoDir
Specifies the path to the Git repository
.EXAMPLE
PS> ./new-branch test123
.NOTES

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Opens the default email client to write a new email
.DESCRIPTION
new-email.ps1 [<address>]
This script opens the default email client to write a new email.
.PARAMETER EmailAddress
Specifies the email address fill in
.EXAMPLE
PS> ./new-email
.NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Generates a new QR code image file
.DESCRIPTION
new-qrcode.ps1 [<Text>] [<ImageSize>]
This script generates a new QR code image file.
.PARAMETER Text
Specifies the text to use
.PARAMETER ImageSize
Specifies the image size (width x height)
.EXAMPLE
PS> ./new-qrcode "Fasten seatbelt" 500x500
.NOTES

View File

@ -3,7 +3,8 @@
Creates a new PowerShell script file
.DESCRIPTION
Creates a new PowerShell script file (by using template file ../Data/template.ps1).
new-script.ps1 [<filename>]
.PARAMETER filename
Specifies the path to the resulting file
.EXAMPLE
PS> ./new-script myscript.ps1
✔️ created new PowerShell script: myscript.ps1

View File

@ -2,7 +2,13 @@
.SYNOPSIS
Creates a new shortcut file
.DESCRIPTION
new-shortcut.ps1 [<shortcut>] [<target>] [<description>]
This script creates a new shortcut file.
.PARAMETER shortcut
Specifies the shortcut filename
.PARAMETER target
Specifies the path to the target
.PARAMETER description
Specifies a description
.EXAMPLE
PS> ./new-shortcut C:\Temp\HDD C:\
.NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Creates a new symbolic link file
.DESCRIPTION
new-symlink.ps1 [<symlink>] [<target>]
This script creates a new symbolic link file.
.PARAMETER symlink
Specifies the new symlink filename
.PARAMETER target
Specifies the path to target
.EXAMPLE
PS> ./new-symlink C:\Temp\HDD C:\
.NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Creates a new tag in a Git repository
.DESCRIPTION
new-tag.ps1 [<TagName>] [<RepoDir>]
This script creates a new tag in a Git repository.
.PARAMETER TagName
Specifies the new tag name
.PARAMETER RepoDir
Specifies the path to the Git repository
.EXAMPLE
PS> ./create-tag v1.7
.LINK

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Creates a new .ZIP file from a folder (including subfolders)
.DESCRIPTION
new-zipfile.ps1 [<folder>]
This script creates a new .ZIP file from a folder (including subfolders).
.PARAMETER folder
Specifies the path to the folder
.EXAMPLE
PS> ./new-zipfile C:\Windows
.NOTES

View File

@ -2,8 +2,9 @@
.SYNOPSIS
Opens the default Web browser
.DESCRIPTION
Opens the default Web browser, optional with given URL
open-browser.ps1 [<URL>]
This script opens the default Web browser, optional with given URL.
.PARAMETER URL
Specifies the URL
.EXAMPLE
PS> ./open-browser
.NOTES

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Starts the calculator application
Starts the calculator app
.DESCRIPTION
open-calculator.ps1
This script starts the calculator application.
.EXAMPLE
PS> ./open-calculator
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Starts the default email client
.DESCRIPTION
open-email-client.ps1
This script starts the default email client.
.EXAMPLE
PS> ./open-email-client
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Starts the File Explorer
.DESCRIPTION
open-file-explorer.ps1
This script starts the File Explorer.
.EXAMPLE
PS> ./open-file-explorer
.NOTES

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Starts the Netflix app (needs to be installed)
Starts the Netflix app
.DESCRIPTION
open-netflix.ps1
This script starts the Netflix application.
.EXAMPLE
PS> ./open-netflix
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Opens the user's OneDrive folder
.DESCRIPTION
open-onedrive.ps1
This script opens the user's OneDrive folder.
.EXAMPLE
PS> ./open-onedrive
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Starts the File Explorer with the recycle bin folder
.DESCRIPTION
open-recycle-bin.ps1
This script starts the File Explorer with the recycle bin folder.
.EXAMPLE
PS> ./open-recycle-bin
.NOTES

View File

@ -2,9 +2,16 @@
.SYNOPSIS
Cherry-picks a Git commit into one or more branches
.DESCRIPTION
pick-commit.ps1 [<CommitID>] [<CommitMessage>] [<Branches>] [<RepoDir>]
Cherry-picks a Git commit into one or more branches (branch names need to be separated by spaces)
NOTE: in case of merge conflicts the script stops immediately!
.PARAMETER CommitID
Specifies the commit ID
.PARAMETER CommitMessage
Specifies the commit message to use
.PARAMETER Branches
Specifies the list of branches, separated by spaces
.PARAMETER RepoDir
Specifies the path to the Git repository
.EXAMPLE
PS> ./pick-commit 93849f889 "Fix typo" "v1 v2 v3"
.NOTES

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Plays the given audio files (supporting MP3 and WAV format)
Plays audio files (MP3 and WAV)
.DESCRIPTION
play-files.ps1 [<FilePattern>]
This script plays the given audio files (supporting MP3 and WAV format).
.PARAMETER FilePattern
Specifies the file pattern
.EXAMPLE
PS> ./play-files *.mp3
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Plays Jingle Bells
.DESCRIPTION
play-jingle-bells.ps1
This script plays Jingle Bells.
.EXAMPLE
PS> ./play-jingle-bells
.NOTES

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Plays the given playlist (in .M3U file format)
Plays a playlist (.M3U format)
.DESCRIPTION
play-m3u.ps1 [<filename>]
This script plays the given playlist (in .M3U file format)
.PARAMETER filename
Specifies the path to the playlist
.EXAMPLE
PS> ./play-m3u C:\MyPlaylist.m3u
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Plays the Mission Impossible theme
.DESCRIPTION
play-mission-impossible.ps1
This script plays the Mission Impossible theme.
.EXAMPLE
PS> ./play-mission-impossible
.NOTES

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Plays a sound file (in MP3 file format)
Plays a sound file (MP3 format)
.DESCRIPTION
play-mp3.ps1 [<MP3-file>]
This script plays a sound file (in .MP3 file format).
.PARAMETER Filename
Specifies the path to the .MP3 file
.EXAMPLE
PS> ./play-mp3 C:\thunder.mp3
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Plays the Super Mario intro
.DESCRIPTION
play-super-mario.ps1
This script plays the Super Mario intro.
.EXAMPLE
PS> ./play-super-mario
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Plays the Tetris melody
.DESCRIPTION
play-tetris-melody.ps1
This script plays the Tetris melody.
.EXAMPLE
PS> ./play-tetris-melody
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Halts the local computer (needs admin rights)
.DESCRIPTION
poweroff.ps1
This script halts the local computer. It needs admin rights.
.EXAMPLE
PS> ./poweroff
.NOTES

View File

@ -1,8 +1,14 @@
<#
.SYNOPSIS
Publishes the given files & folders to IPFS
Publishes files & folders to IPFS
.DESCRIPTION
publish-to-ipfs.ps1 [<FilePattern>] [<HashList>]
This script publishes the given files and folders to IPFS.
.PARAMETER FilePattern
Specifies the file pattern
.PARAMETER HashList
Specifies the path to the resulting hash list
.PARAMETER DF_Hashes
Specifies the path to the resulting digital forensic hashes
.EXAMPLE
PS> ./publish-to-ipfs C:\MyFile.txt
.NOTES

View File

@ -1,8 +1,10 @@
<#
.SYNOPSIS
Pulls updates for a local Git repository (including submodules)
Pulls updates for a Git repository (including submodules)
.DESCRIPTION
pull-repo.ps1 [<repo-dir>]
This script pulls updates for a local Git repository (including submodules).
.PARAMETER RepoDir
Specifies the path to the Git repository
.EXAMPLE
PS> ./pull-repo C:\MyRepo
.NOTES

View File

@ -2,7 +2,9 @@
.SYNOPSIS
Pulls updates for all Git repositories in a folder (including submodules)
.DESCRIPTION
pull-repos.ps1 [<ParentDir>]
This script pulls updates for all Git repositories in a folder (including submodules).
.PARAMETER ParentDir
Specifies the path to the parent folder
.EXAMPLE
PS> ./pull-repos C:\MyRepos
.NOTES

View File

@ -2,11 +2,11 @@
.SYNOPSIS
Queries and saves the S.M.A.R.T. data of your HDD's/SSD's
.DESCRIPTION
query-smart-data.ps1 [<directory>]
Queries the S.M.A.R.T. data of your HDD/SSD's and saves it to the current/given directory
Queries the S.M.A.R.T. data of your HDD/SSD's and saves it to the current/given directory.
(use smart-data2csv.ps1 to generate a CSV table for analysis).
Requires smartctl (smartmontools) and admin rights. For automation copy this script to /etc/cron.daily
.PARAMETER Directory
Specifies the path to the target directory
.EXAMPLE
PS> ./query-smart-data
.NOTES

View File

@ -2,7 +2,11 @@
.SYNOPSIS
Reboots the FRITZ!Box device
.DESCRIPTION
reboot-fritzbox.ps1 [<Username>] [<Password>]
This script reboots the FRITZ!Box device
.PARAMETER Username
Specifies the user name
.PARAMETER Password
Specifies the password
.EXAMPLE
PS> ./reboot-fritzbox
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Reboots the local computer (needs admin rights)
.DESCRIPTION
reboot.ps1
This script reboots the local computer (needs admin rights).
.EXAMPLE
PS> ./reboot
.NOTES

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Creates a scheduled task that will display a popup message
.DESCRIPTION
remind-me.ps1
This script creates a scheduled task that will display a popup message.
.EXAMPLE
PS> ./remind-me "Dentist" "4/10/2021 12:00 PM"

View File

@ -2,8 +2,9 @@
.SYNOPSIS
Removes all empty subfolders within a directory tree
.DESCRIPTION
remove-empty-dirs.ps1 [<DirTree>]
<DirTree> is the path to the directory tree
This script removes all empty subfolders within a directory tree.
.PARAMETER DirTree
Specifies the path to the directory tree
.EXAMPLE
PS> ./remove-empty-dirs C:\Temp
.NOTES

Some files were not shown because too many files have changed in this diff Show More