Added comment-based help

This commit is contained in:
Markus Fleschutz
2020-12-29 14:14:21 +00:00
parent 3b83d94809
commit 66bc6a7699
85 changed files with 687 additions and 725 deletions

View File

@ -1,17 +1,18 @@
#!/snap/bin/powershell
<#
.SYNTAX ./write-blue.ps1 [<text>]
.DESCRIPTION writes the given text in a blue foreground color
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
# Syntax: ./write-blue.ps1 [<text>]
# Description: writes the given text in a blue foreground color
# Author: Markus Fleschutz
# Source: github.com/fleschutz/PowerShell
# License: CC0
param([string]$Text)
param([String]$Text)
try {
if ($Text -eq "" ) {
[String]$Text = read-host "Enter text to write"
}
write-host -foregroundcolor blue $Text
write-host -foregroundColor blue $Text
exit 0
} catch {
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"