mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-15 22:48:17 +02:00
Improve list-scripts.ps1
This commit is contained in:
parent
9fad979652
commit
311b5571a3
@ -11,7 +11,7 @@ function ListScripts { param([string]$FilePath)
|
|||||||
$Table = import-csv "$FilePath"
|
$Table = import-csv "$FilePath"
|
||||||
foreach($Row in $Table) {
|
foreach($Row in $Table) {
|
||||||
New-Object PSObject -Property @{
|
New-Object PSObject -Property @{
|
||||||
'Script' = "$($Row.Script)"
|
'PowerShell Script' = "$($Row.Script)"
|
||||||
'Description' = "$($Row.Description)"
|
'Description' = "$($Row.Description)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -21,7 +21,7 @@ function ListScripts { param([string]$FilePath)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$PathToRepo = "$PSScriptRoot/.."
|
$PathToRepo = "$PSScriptRoot/.."
|
||||||
ListScripts "$PathToRepo/Data/scripts.csv" | format-table -property Script,Description
|
ListScripts "$PathToRepo/Data/scripts.csv" | format-table -property "PowerShell Script",Description
|
||||||
|
|
||||||
write-host -foregroundColor green "OK - $($global:NumScripts) PowerShell scripts total"
|
write-host -foregroundColor green "OK - $($global:NumScripts) PowerShell scripts total"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user