UniversalAutomation.Dashboard.psm1
function New-UADashboard { # If True you have UD $Cache:UAVersion = "Basic" $UDPremium = $null -ne (Get-Module -Name UniversalDashboard -ErrorAction SilentlyContinue) $IncludedPages = @("dashboard.ps1") $IncludedPages += "script.ps1" $IncludedPages += "self-service.ps1" $IncludedPages += "job.ps1" if ($UDPremium) { $Cache:UAVersion = "Premium" } else { $Cache:UAVersion = "Community" } Import-Module "$PSScriptRoot/controls/controls.psm1" Import-Module "$PSScriptRoot/functions/uadashfunctions.ps1" $Pages = Get-ChildItem -Path "$PSScriptRoot/pages" | ForEach-Object { if ($_.Name -in $IncludedPages) { . $_.FullName } } $DashboardOptions = @{ Title = "Universal Automation" Pages = $Pages Navigation = New-UDSideNav -None } New-UDDashboard @DashboardOptions } |