Simple dashboard code called 22 times?

Product: PowerShell Universal
Version: 3.5.1

I’m trying to get up to speed with the new v3 environment. One thing I noticed is even with a simple dashboard, the output window says gets called 22 times opening the page. I verified nothing else was trying to refresh, it happens every time. Is this normal? I notice the timestamps are almost exactly the same so maybe this is just a logging bug?

Set-Location $Repository
$DebugPreference = 'Continue'
$ErrorActionPreference = 'Stop'
New-UDDashboard -Title 'ADTest' -Content {
  Write-Debug 'New Dashboard!'
  New-UDTabs -Tabs {
    Write-Debug 'New Tabs!'
    # . $PWD/testCard.ps1
  }
}

Looks to be a logging bug:

Set-Location $Repository
$DebugPreference = 'Continue'
$ErrorActionPreference = 'Stop'

New-UDDashboard -Title 'ADTest' -Content {
  Write-Debug "New Dashboard! $(Get-Random)"
  New-UDTabs -Tabs {
    Write-Debug "New Tabs! $(Get-Random)"
    # . $PWD/testCard.ps1
  }
}

image

I opened an issue for this.

1 Like