diff --git a/Scripts/list-scripts.ps1 b/Scripts/list-scripts.ps1 index 4f78c579..a2bd2b39 100755 --- a/Scripts/list-scripts.ps1 +++ b/Scripts/list-scripts.ps1 @@ -27,7 +27,12 @@ function ListScripts { param([string]$FilePath) } try { - ListScripts "$PSScriptRoot/../Data/scripts.csv" | Format-Table -property No,Script,Description +# 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])" diff --git a/Scripts/uninstall-one-calendar.ps1 b/Scripts/uninstall-one-calendar.ps1 index b4fa96f8..e95f24b1 100755 --- a/Scripts/uninstall-one-calendar.ps1 +++ b/Scripts/uninstall-one-calendar.ps1 @@ -1,10 +1,10 @@ -c<# +<# .SYNOPSIS Uninstalls One Calendar .DESCRIPTION This PowerShell script uninstalls One Calendar from the local computer. .EXAMPLE - PS> ./uninstall-one-calendar + PS> ./uninstall-one-calendar.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -12,12 +12,14 @@ #> try { - "Uninstalling One Calendar, please wait..." + "⏳ Uninstalling One Calendar ..." + $StopWatch = [system.diagnostics.stopwatch]::startNew() & winget uninstall "One Calendar" if ($lastExitCode -ne "0") { throw "Can't uninstall One Calendar, is it installed?" } - "One Calendar is uninstalled now." + [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds + "✔️ Removal of One Calendar tool $Elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"