PowerShell/data/template.ps1

32 lines
792 B
PowerShell
Raw Normal View History

2021-10-04 13:31:02 +02:00
<#
2021-08-26 11:08:14 +02:00
.SYNOPSIS
2023-12-05 09:29:58 +01:00
enter a brief description of the script here
2021-08-26 11:08:14 +02:00
.DESCRIPTION
2023-12-05 09:29:58 +01:00
enter a detailed description of the script here
.PARAMETER
enter the description of a parameter here (repeat the .PARAMETER for each parameter)
2021-08-26 11:08:14 +02:00
.EXAMPLE
2023-12-05 09:29:58 +01:00
enter a sample command that uses the script, optionally followed by sample output and a description (repeat the .EXAMPLE for each example)
2021-08-26 11:08:14 +02:00
.NOTES
2021-08-26 12:38:08 +02:00
Author: enter full name here
License: enter license here
2021-08-29 17:50:03 +02:00
.LINK
2023-12-05 09:29:58 +01:00
enter URL to additional information here
2021-08-26 11:08:14 +02:00
#>
2021-10-04 13:31:02 +02:00
#requires -version 4
2021-08-26 12:48:04 +02:00
param() # ← enter script parameters here
2021-08-26 11:08:14 +02:00
2021-08-26 12:48:04 +02:00
# ← enter functions here
2021-08-26 11:08:14 +02:00
try {
2021-08-26 12:38:08 +02:00
# ← enter instructions here
2021-08-26 11:08:14 +02:00
"✔️ Done."
2023-12-05 09:29:58 +01:00
exit 0 # success
2021-08-26 11:08:14 +02:00
} catch {
2023-12-05 09:29:58 +01:00
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
2021-08-26 11:08:14 +02:00
exit 1
}