mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 13:04:59 +02:00
Added comment-based help
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
#!/snap/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./write-red.ps1 [<text>]
|
||||
.DESCRIPTION writes the given text in a red foreground color
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
# Syntax: ./write-red.ps1 [<text>]
|
||||
# Description: writes the given text in a red 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"
|
||||
[string]$Text = read-host "Enter text to write"
|
||||
}
|
||||
write-host -foregroundcolor red $Text
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user