2024-09-03 15:00:02 +02:00
|
|
|
|
<#
|
2024-06-18 09:19:46 +02:00
|
|
|
|
.SYNOPSIS
|
2024-09-03 18:26:53 +02:00
|
|
|
|
Writes a help page
|
2024-06-18 09:19:46 +02:00
|
|
|
|
.DESCRIPTION
|
2024-09-03 18:26:53 +02:00
|
|
|
|
This PowerShell script writes a help page to help the user.
|
2024-06-18 09:19:46 +02:00
|
|
|
|
.EXAMPLE
|
2024-09-03 18:26:53 +02:00
|
|
|
|
PS> ./write-help.ps1
|
2024-06-18 09:19:46 +02:00
|
|
|
|
.LINK
|
|
|
|
|
https://github.com/fleschutz/PowerShell
|
|
|
|
|
.NOTES
|
|
|
|
|
Author: Markus Fleschutz | License: CC0
|
|
|
|
|
#>
|
2024-05-29 17:07:27 +02:00
|
|
|
|
|
2024-09-03 18:06:07 +02:00
|
|
|
|
function Line ([string]$line) {
|
|
|
|
|
Write-Host $line -foregroundColor white -backgroundColor black
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-29 17:07:27 +02:00
|
|
|
|
try {
|
2024-09-03 18:06:07 +02:00
|
|
|
|
Line "█████████████████████████████████████"
|
|
|
|
|
Line "█████████████████████████████████████"
|
2024-09-03 18:18:09 +02:00
|
|
|
|
Line "████ ▄▄▄▄▄ █▀ █▀▀█▀▀ ▄▄██ ▄▄▄▄▄ ████ POWERSHELL $($PSVersionTable.PSVersion) $($PSVersionTable.PSEdition) edition"
|
2024-09-03 18:06:07 +02:00
|
|
|
|
Line "████ █ █ █▀ ▄ █▀ ▀ ▀▄█ █ █ █ ████"
|
2024-09-03 18:18:09 +02:00
|
|
|
|
Line "████ █▄▄▄█ █▀█ █▄▀▄▀ ▀ ▄▄█ █▄▄▄█ ████ Documentation: https://docs.microsoft.com/en-us/powershell"
|
2024-09-03 18:06:07 +02:00
|
|
|
|
Line "████▄▄▄▄▄▄▄█▄█▄█ █▄█ █▄▀ █▄▄▄▄▄▄▄████"
|
2024-09-03 18:18:09 +02:00
|
|
|
|
Line "████▄▄ ▄█▄▄ ▄█▄▄ █▀ ▀▀▀ ▀▄▀▄█▄▀████ Tutorial: https://www.guru99.com/powershell-tutorial.html"
|
2024-09-03 18:06:07 +02:00
|
|
|
|
Line "████▀▄▄█▀█▄██ ▀ ▄▄▀ █▄█▀ ▀ ▄▀▀█▀█████"
|
2024-09-03 18:26:53 +02:00
|
|
|
|
Line "█████ ▄▄█▄▄▀▄ ▀▄▀ ▄▄ ▀ ▀▀▀ ▀▄▄█▀████ 500+ Sample Scripts: https://github.com/fleschutz/PowerShell"
|
2024-09-03 18:06:07 +02:00
|
|
|
|
Line "████▄ ▀ ▄ ▄▄█ █▀██▄ ██▀▄█▄▄▀▄▄▀█████"
|
2024-09-03 18:26:53 +02:00
|
|
|
|
Line "████ ████▄▄ ▄█▄▄▄██ ▀ ▀▀▀▀▄ █▀████ FAQ's: https://github.com/fleschutz/PowerShell/blob/main/docs/FAQ.md"
|
2024-09-03 18:06:07 +02:00
|
|
|
|
Line "████ ███▄ ▄▀▀██ ▄█ ▄▄▄█▀ ▄▄ ██▄▀█████"
|
2024-09-03 18:26:53 +02:00
|
|
|
|
Line "████▄█▄███▄▄▀▄▄▄▀ ▄▄ ▄▀▄ ▄▄▄ ▀ ████ Cheat Sheet: https://github.com/fleschutz/PowerShell/blob/main/docs/cheat-sheet.md"
|
2024-09-03 18:06:07 +02:00
|
|
|
|
Line "████ ▄▄▄▄▄ █▄▄▄█▀█▄ ██ █▄█ ▄▄█▀████"
|
2024-09-03 18:26:53 +02:00
|
|
|
|
Line "████ █ █ █ ▀▄█▄ ▄▄ ▀█ ▄▄▄▄▀ ████ NOTE: Use <Ctrl> + <Click> to open the links in your browser."
|
2024-09-03 18:06:07 +02:00
|
|
|
|
Line "████ █▄▄▄█ █ ██ ▄█▄ ▄▀▀▀ ▄▄ ▄ █████"
|
|
|
|
|
Line "████▄▄▄▄▄▄▄█▄▄█▄▄████▄▄▄██▄▄▄█▄██████"
|
|
|
|
|
Line "█████████████████████████████████████"
|
|
|
|
|
Line "█████████████████████████████████████"
|
2024-09-03 18:18:09 +02:00
|
|
|
|
exit 0 # success
|
2024-05-29 17:07:27 +02:00
|
|
|
|
} catch {
|
2024-09-03 18:18:09 +02:00
|
|
|
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
|
|
|
exit 1
|
2024-08-26 15:36:14 +02:00
|
|
|
|
}
|