Update open-dashboards.ps1

This commit is contained in:
Markus Fleschutz 2023-07-01 18:02:07 +02:00
parent aa49dc412f
commit 1eec45fb63

View File

@ -1,12 +1,12 @@
<#
.SYNOPSIS
Open Web dashboards
Open web dashboards
.DESCRIPTION
This PowerShell script launches the Web browser with tabs of popular dashboard websites.
This PowerShell script launches the web browser with tabs of 18 dashboard websites.
.EXAMPLE
PS> ./open-dashboards.ps1
(1/2) Loading Data/web-dashboards.csv...
(2/2) Launching Web browser with tabs... Toggl Track · Google Calendar · CNN News...
(2/2) Launching web browser with tabs: Toggl Track · Google Calendar · CNN News...
...
.LINK
https://github.com/fleschutz/PowerShell
@ -19,7 +19,7 @@ try {
Write-Host "⏳ (1/2) Loading Data/web-dashboards.csv..."
$table = Import-CSV "$PSScriptRoot/../Data/web-dashboards.csv"
$numRows = $table.Length
Write-Host "⏳ (2/2) Launching Web browser with tabs... " -noNewline
Write-Host "⏳ (2/2) Launching web browser with tabs: " -noNewline
foreach($row in $table) {
Write-Host "$($row.NAME) · " -noNewline
& "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)"
@ -27,7 +27,7 @@ try {
}
Write-Host ""
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"opened $NumRows Web dashboards in $elapsed sec (Hint: use switch-tabs.ps1 to switch between browser tabs automatically)"
"Opened $NumRows web dashboards in $elapsed sec (Hint: use switch-tabs.ps1 to switch between browser tabs automatically)"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"