controls/stats-grid.ps1
function New-StatsGrid { $Stats = @() $Scripts = Get-UAScript $StatItem = [PSCustomObject]@{ Name = "Scripts" Value = ($Scripts.Count) } $Stats += $StatItem New-UDGrid -Id "StatGrid" -Title "Stats" -Headers @("Name","Value") -Properties @("Name","Value") -Endpoint { $Stats | ForEach-Object { [PSCustomObject]@{ Name = $_.Name Value = $_.Value } } | Out-UDGridData } -AutoRefresh } |