mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-17 02:01:01 +01: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"
|
||||
foreach($Row in $Table) {
|
||||
New-Object PSObject -Property @{
|
||||
'Script' = "$($Row.Script)"
|
||||
'PowerShell Script' = "$($Row.Script)"
|
||||
'Description' = "$($Row.Description)"
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@ function ListScripts { param([string]$FilePath)
|
||||
|
||||
try {
|
||||
$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"
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user