I’m trying to work with New-UDMonitor and when using the following code New-UdMonitor -Title "CPU (% processor time)" -Type Line -DataPointHistory 20 -RefreshInterval 10 -ChartBackgroundColor '#80FF6B63' -ChartBorderColor '#FFFF6B63' -Endpoint { try { Get-Counter '\Processor(_Total)\% Processor Time' -SampleInterval 1 -MaxSamples 1 -ComputerName $DeviceName -ErrorAction SilentlyContinue | Select-Object -ExpandProperty CounterSamples | Select-Object -ExpandProperty CookedValue | Out-UDMonitorData } catch { 0 | Out-UDMonitorData } }
and every single time I load the dynamic page that have this code the powershell windows close like UD crashes and nothing relevant is raised in the logs and I can’t figure out why it behave like this.
I can’t imagine why PowerShell would crash because of UD like that. I’m surprised there aren’t any event viewer logs. If it was an app crash windows would create them It could be the application exiting for some reason but this is the first I’ve heard of this.
Does it matter what PowerShell cmdlets you are calling in your monitor or is it just whenever you add another monitor it crashes?
whatever I call in the monitor, as long as there are more than one, the whole thing crashes, I can’t figure out why this is happening, and honestly I can’t find any error in event viewer or anywhere else on the server running the dashboard, it’s obviously pretty weird.
Do you have a full dashboard you could share the reproduces this issue? I’d like to try it locally. There must be something I’m missing. I can add multiple monitors without issue.