Add template.ps1

This commit is contained in:
Markus Fleschutz 2021-08-26 11:08:14 +02:00
parent 233bb64a17
commit 828a037b51
3 changed files with 29 additions and 0 deletions

View File

@ -209,6 +209,7 @@ switch-shelly1.ps1, switches a Shelly1 device in the local network
sync-repo.ps1, synchronizes a Git repository by push & pull (including submodules) sync-repo.ps1, synchronizes a Git repository by push & pull (including submodules)
take-screenshot.ps1, takes a single screenshot take-screenshot.ps1, takes a single screenshot
take-screenshots.ps1, takes multiple screenshots take-screenshots.ps1, takes multiple screenshots
template.ps1, copy this template PowerShell script to write a new one
translate-file.ps1, translates the given text file into another language translate-file.ps1, translates the given text file into another language
translate-files.ps1, translates the given text files into any supported language translate-files.ps1, translates the given text files into any supported language
translate-text.ps1, translates the given text into other languages translate-text.ps1, translates the given text into other languages

Can't render this file because it has a wrong number of fields in line 84.

View File

@ -196,6 +196,7 @@ Mega Collection of PowerShell Scripts
* [list-profiles.ps1](Scripts/list-profiles.ps1) - lists your PowerShell profiles * [list-profiles.ps1](Scripts/list-profiles.ps1) - lists your PowerShell profiles
* [list-scripts.ps1](Scripts/list-scripts.ps1) - lists all PowerShell scripts in this repository * [list-scripts.ps1](Scripts/list-scripts.ps1) - lists all PowerShell scripts in this repository
* [set-profile.ps1](Scripts/set-profile.ps1) - updates your PowerShell user profile * [set-profile.ps1](Scripts/set-profile.ps1) - updates your PowerShell user profile
* [template.ps1](Scripts/template.ps1) - copy this template PowerShell script to write a new one
🛒 Various PowerShell Scripts 🛒 Various PowerShell Scripts
------------------------------ ------------------------------

27
Scripts/template.ps1 Executable file
View File

@ -0,0 +1,27 @@
<#
.SYNOPSIS
template.ps1
.DESCRIPTION
Copy this template PowerShell script to write a new one
.EXAMPLE
PS> .\template.ps1
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz
License: CC0
#>
param() # <- enter file parameter(s) here
# <- enter function(s) here
try {
# <- enter workload here
"✔️ Done."
exit 0
} catch {
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}