Added list-scripts.ps1

This commit is contained in:
Markus Fleschutz
2020-12-29 14:37:12 +00:00
parent 3b87b47a3b
commit 9618b25d80
3 changed files with 111 additions and 1 deletions

24
Scripts/list-scripts.ps1 Executable file
View File

@ -0,0 +1,24 @@
#!/snap/bin/powershell
<#
.SYNTAX ./list-scripts.ps1
.DESCRIPTION lists the PowerShell scripts in this repository
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
write-progress "Reading scripts.csv..."
$PathToRepo = (get-item $MyInvocation.MyCommand.Path).directory.parent
$Table = import-csv "$PathToRepo/Data/scripts.csv"
write-output ""
write-output "List of PowerShell Scripts"
write-output "=========================="
foreach($Row in $Table) {
write-output "* $($Row.Filename) - $($Row.Description)"
}
exit 0
} catch {
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}