Hello guys,
I’m building a dashboard to monitor the status of Windows services. And I’m displaying their status on a UDCard, like so:
$status = Get-Service -Name Jenkins | ForEach-Object { $_.Status }
New-UDCard -Title "Jenkins Status" -Text $status
However this does not seem to update according to the service status.
It feels like the “Get-Service” cmdlet only runs once I start the dashboard and then never updates again.
How can I make it so that the status updates on a given interval? Or at least every time I refresh the page?
Thank you in advance.
José