I used to use the previous version of Universal Dashboard back when Start-UDDashboard -Port 8080 was a thing and was having a great time creating and testing out functionality of the module at the time.
I took a break from PowerShell scripting as i was tied up in other infrastructure projects and have returned to produce some dashboards for my company but I am completely at a loss with the new version and cant even get a basic dashboard to run.
The new UI looks great and I can find my way around but when it comes to creating a new dashboard, i really donât understand where to begin? Using the documentation, i tried to add in some native PSCommandlets as a test but every one i have tried has failed?
The below for example doesnât seem to work and the dashboard just crashes. I tried the same for Get-Process and Get-WMIObject and none of these native cmdlets work as I need them for my dashboard use cases.
Sorry if I am being thick or am missing something but can someone please point me in the right direction as to how I can get this working?
And do we really have to use the built in code editor in the GUI as i prefer to edit and test my code using VSCode but every time i try and edit the .ps1 file of the dashboard i create in the GUI, again the dashboard crashesâŚ
I have a paid license as i wanted to use full functionality but it seems im stuck at the first hurdle and cant move forwardâŚ
First off, this dashboard isnât going to display what you like. To be fair, it wouldnât display anything in UDv2 either. Youâll want to put your services into something like a table.
You also donât need to edit in the web browser. You can open files in C:\ProgramData\UniversalAutomation\Repository. Any changes you make in there will be reflected in the admin console. It automatically reloads those files after they change.
One setting Iâd suggest for your dashboard is auto-deploy. It will auto-reload the page as you make changes. No need to stop and start anything so it enables pretty rapid development.
Thanks @adam once again i greatly appreciate the help as that seems to have done it! I am however at another small roadblock.
I am using the cmdlet Get-Printer and the PrinterStatus property isnât displaying as âNormalâ on the dashboard and is just showing blank. If I run this in ISE or wherever else, it shows as normal.
To test this, I changed the PrinterStatus property value of a printer from âNormalâ to âGoodâ in ISE and this seems to work fine but when testing this in Universal, i get the error:
âPrinterStatusâ is a ReadOnly property
However when i run:
$Printers.PrinterStatus.IsReadOnly, it returns $False.
Do you know what i may be missing regarding this? Just as a FYI, I am using the below to organise and create my columns:
It looks like PrinterStatus is a Microsoft.PowerShell.Cmdletization.GeneratedTypes.Printer.PrinterStatus object. Youâll want to implement a render method for that column to return the string.