UDTheme not recognized


I’m trying to set a Theme (even if my dashboards are far to be completed) and i’ve got some errors while getting themes and apply it :

New-UDDashboard -Pages $Pages -Theme (Get-UDTheme -Name 'Azure')

The term ‘Get-UDTheme’ is not recognized as the name of a cmdlet

My setup is a Win2019Core and UD from zip actually running as a service.
It seems that this cmdlet is not present (only New-UDNivoTheme) :
Get-Command -Module Universal,UniversalDashboard,UniversalDashboardServer | where{$_.Name -like “Them”}

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        New-UDNivoTheme                                    2.9.0      UniversalDashboard 

Have you got some ideas ?

What version of the UD Framework are you using?
1.4 - 2.9 used theming as you have described with get-udtheme, see: https://docs.universaldashboard.io/look-and-feel/themes
However, while I’ve not yet used it myself, I beleive theming has been re-designed in v3 up, see:

I’ve just realised you’re using new-uddashboard and you’ve got 2.9 in your code snippet, so in that case I’m not sure!

Thank you for your reply.
I’ve not install the module Install-Module UniversalDashboard -AcceptLicense or Install-Module UniversalDashboard.Community -AcceptLicense

I have unzipped the version v.1.2.9 and launch the service after register it.

I’ve search for available module after loading the .psd1 files in the folder where i extracted the zip file : D:\data\Universal\www

  • Import-Module D:\data\Universal\www\Universal.psd1
  • Import-Module D:\data\Universal\www\UniversalDashboard.psd1
  • Import-Module D:\data\Universal\www\UniversalDashboardServer.psd1

Get-Command on them output no cmdlet like New-UDTheme or Get-UDTheme.

Get-Module on them show me some versions :

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     0.0        Universal                           {Add-UAScriptTag, Add-UDDashboard, Add-UDDashboardComponen...
Script     2.9.0      UniversalDashboard                  {Clear-UDCache, ConvertTo-JsonEx, New-UDElement, New-UDEnd...
Script     0.0        UniversalDashboardServer            {Find-Object, Get-UDCacheData, Get-UDContentType, Get-UDCo...

Maybe some cmdlet are not provided in the zip version ?

This might shed light on your problem. There are two frameworks built into Universal. V2 & V3.
When you create a new dashboard in universal, you should have a ‘framework’ option to choose either one. If the dashboard is running with V3 this would explain why you’re getting the error you have.

The dashboard cmdlets are in C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks
You can import the module from there.
When you import Universal, make sure to do it at the global scope and do import it before the framework.

Import-Module "C:\Program Files (x86)\Universal\Universal.psd1" -Scope Global
1 Like

Thanks for the explanations. :upside_down_face:

There are no directories like :

  • "C:\Program Files (x86)\Universal\
  • "C:\ProgramData\UD\PowerShellUniversal\"

I unzip sources like advised on a specific directory.
In my case, they are located here : D:\data\Universal\www\PowerShellUniversal\Dashboard\Frameworks

So, if i refer to the web admin interface :

  • frameworks are loaded from D:\data\Universal\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\

Dashboard Frameworks

Name Version File Path Actions
UniversalDashboard 2.9.1-beta6 D:\data\Universal\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\2.9.1-beta6 Delete
UniversalDashboard 3.0.0-beta7 D:\data\Universal\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\3.0.0-beta7
  • the current framework used by the dahsboard is UniversalDashboard (3.0.0-beta7).


Status Name Base Url File Path Framework Process Authenticated Actions
Annuaire /ad Annuaire.ps1 UniversalDashboard (3.0.0-beta7) powershell.exe (3212) View Info Start Delete

With the -Scope Global, the cmdlet Appears ! :

Import-Module D:\data\Universal\www\Universal.psm1 -Scope Global
Import-Module D:\data\Universal\www\Universal.psd1 -Scope Global
Get-Module Universal

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     0.0        Universal                           {Add-UAScriptTag, Add-UDDashboard, Add-UDDashboardComponent, Add-UDDashboardFramework...}

Get-Command | Where{$_.Name -like "*UDTheme*"}

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Get-UDTheme                                        2.9.0      UniversalDashboard
Cmdlet          New-UDTheme                                        2.9.0      UniversalDashboard

I don’t understand why is the version 2.9.0 is showned … :face_with_monocle:

Here are somes logs if you’ve got and idea :

[07-21-20 08:59:24 PM] Waiting for dashboard information…

[07-21-20 08:59:24 PM] Dashboard information received. Starting dashboard.

[07-21-20 08:59:25 PM] Startup: The term ‘Get-UDTheme’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

[07-21-20 08:59:25 PM] Startup: at , D:\data\Universal\UniversalAutomation\Repository\Annuaire.ps1: line 110

at , : line 1

If you want to import the 2.9.1 or 3 module you’d use: “C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\2.9.1-beta1\UniversalDashboard.psd1” or whatever is relative to how it’s been installed and relative to the framework you desire.

If you intend to use get-udtheme then you’ll need to make sure your dashboard is using the correct framework - or just update your code to the v3 mechanism.

I’m OK with that.

I’m a beginner, so i’m only using the last framework ^^ (i think BTW)

I’ve tried :

$Theme = @{
    palette = @{
        primary = @{
            main = '#111111'
New-UDDashboard -Title "Annuaire" -Pages $Pages -Theme $Theme

And the theme is well applied as expected.

But New-UDDashboard -Title "Annuaire" -Pages $Pages -Theme (Get-UDTheme -Name 'Azure') doesn’t work. Like if the cmdlet Get-UDTheme is not recognized.

Is the way to use Get/New-UDtheme has changed ?
I take a look to the links you provided and Get-UDTheme/New-UDTheme seems to exists in v3 : https://github.com/ironmansoftware/universal-dashboard/blob/master/src/v3/UniversalDashboard.psd1

But, when i compare v2 and v3, the function Get-UDTheme seems to have disappeared :

Can you confirmed that ?


I cant give you a definitive answer I’m afraid, maybe someone else can.
I was under the impression themeing had changed and therfore it had been removed, but then again maybe it is in v3, I’m probably out of my depth on this one as I’ve not really had the chance to play around with v3 that much to be familar with it, I do know its still in beta though and there maybe things still being ironed out. I’ve heard some people in this forum are using it and saying its much easier/better to use than v2, although everything I’ve done upto this point has been pretty much in v2, I’ve only started dipping my foot into the universal waters and thinking about testing/switching to v3 :stuck_out_tongue:

1 Like

Personally I think there’s still a lot of gaps in the documentation with v3, still in beta - there are many changes to the v2 framework to get it to work with universal also (see migrating), hence why both the frameworks v2 and v3 bundled with universal are both beta.

If you’re a beginner and you want to get off the ground quickly, I’d look at using V2.9.0 universal dashboard module from the ps gallery first, the documentation is pretty comprehensive and I’ve not had any issues with it: https://docs.universaldashboard.io/

The caveat to that is that when universal & v3 comes along in a more polished version, you may have some work to migrate your dashboards in order to get them fully working under the new platform.

1 Like

v3 doesn’t have any built in themes besides the default one and that’s why Get-UDTheme doesn’t exist in v3. It’s certainly something we can add back to get some of the default v2 look and feels added back.