mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-24 02:48:17 +02:00
Updated list-scripts.ps1
This commit is contained in:
parent
3705f9c2dd
commit
d0de5af787
@ -15,14 +15,15 @@ function ListScripts { param([string]$FilePath)
|
|||||||
'Description' = "$($Row.Description)"
|
'Description' = "$($Row.Description)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$global:NumScripts = $Table.Count
|
||||||
write-progress -completed "Reading $FilePath..."
|
write-progress -completed "Reading $FilePath..."
|
||||||
write-output ""
|
|
||||||
write-output "($($Table.Count) PowerShell scripts total)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$PathToRepo = "$PSScriptRoot/.."
|
$PathToRepo = "$PSScriptRoot/.."
|
||||||
ListScripts "$PathToRepo/Data/scripts.csv" | format-table -property Script,Description
|
ListScripts "$PathToRepo/Data/scripts.csv" | format-table -property Script,Description
|
||||||
|
|
||||||
|
write-host -foregroundColor green "OK - $($global:NumScripts) PowerShell scripts total"
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user