mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-15 06:28:17 +02:00
Update open-dashboards.ps1
This commit is contained in:
parent
4408b5157a
commit
1eba16843f
@ -13,13 +13,17 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$stopWatch = [system.diagnostics.stopwatch]::startNew()
|
$stopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||||
Write-Progress "⏳ Opening Web dashboards in your browser..."
|
Write-Progress "⏳ Loading Data/popular-dashboards.csv..."
|
||||||
$Table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv"
|
$Table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv"
|
||||||
$NumRows = $Table.Length
|
$NumRows = $Table.Length
|
||||||
foreach($Row in $Table) {
|
foreach($Row in $Table) {
|
||||||
& "$PSScriptRoot/open-default-browser.ps1" "$Row.URL"
|
$Name = $Row.NAME
|
||||||
|
$URL = $Row.URL
|
||||||
|
Write-Progress "⏳ Opening $Name in your browser..."
|
||||||
|
& "$PSScriptRoot/open-default-browser.ps1" "$URL"
|
||||||
Start-Sleep -milliseconds 100
|
Start-Sleep -milliseconds 100
|
||||||
}
|
}
|
||||||
|
Write-Progress -completed "."
|
||||||
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||||
"✅ Opened $NumRows Web dashboards in $elapsed sec (use switch-tabs.ps1 to switch the tabs automatically)"
|
"✅ Opened $NumRows Web dashboards in $elapsed sec (use switch-tabs.ps1 to switch the tabs automatically)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
Loading…
Reference in New Issue
Block a user