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-logbook.ps1 [<text>]
.DESCRIPTION writes the given text to the logbook (../Data/Logbook.csv)
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
# Syntax: ./write-logbook.ps1 [<text>]
# Description: writes the given text to the logbook (../Data/Logbook.csv)
# Author: Markus Fleschutz
# Source: github.com/fleschutz/PowerShell
# License: CC0
param([string]$Text = "")
param([String]$Text)
try {
$Time = Get-Date -format "yyyy-MM-ddTHH:mm:ssZ" -AsUTC
$Time = get-date -format "yyyy-MM-ddTHH:mm:ssZ" -asUTC
$User = $(whoami)
if ($Text -eq "" ) {
[String]$Text = read-host "Enter text to write"
[string]$Text = read-host "Enter text to write"
}
$Line = "$Time,$User,$Text"