mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-28 23:56:52 +01:00
Update list-scripts.ps1
This commit is contained in:
parent
8a69f78eb5
commit
8af228e009
@ -27,12 +27,12 @@ function ListScripts { param([string]$FilePath)
|
||||
}
|
||||
|
||||
try {
|
||||
# ListScripts "$PSScriptRoot/../Data/scripts.csv" | Format-Table -property No,Script,Description
|
||||
$files = Get-ChildItem -path "./*.ps1" -attributes !Directory
|
||||
foreach ($file in $files) {
|
||||
$help = Get-Help $file -full
|
||||
Write-Output "$($file.Name),$($help.Synopsis),"
|
||||
}
|
||||
ListScripts "$PSScriptRoot/../Data/scripts.csv" | Format-Table -property No,Script,Description
|
||||
# $files = Get-ChildItem -path "./*.ps1" -attributes !Directory
|
||||
# foreach ($file in $files) {
|
||||
# $help = Get-Help $file -full
|
||||
# Write-Output "$($file.Name),$($help.Synopsis),"
|
||||
# }
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user