Hello - I’m a total noob with UD and feel kinda stupid about this one. I have a data collection script that goes through all our workstations and collects mere TCP connection info. I was successful piping the object to a New-UDGrid command, and now I’d like to pipe to Out-UDChartData, for a simple pie or ring chart that shows counts of computers up and counts of computers down. Seems simple, but I don’t know what i am missing in my code.
I have 2 objects that I have been trying to pipe in,
WhatsUpDown (a 3-D array of objects like this):
Name MemberType Definition
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
ComputerName NoteProperty string ComputerName=Computer-name
IsON NoteProperty bool IsON=True
UpDown (a simple 2-D object with 2 values - a count of computers up and a count of computers down:
Name MemberType Definition
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Down NoteProperty int Down=5
DownLabel NoteProperty string DownLabel=DOWN
Up NoteProperty int Up=11
UpLabel NoteProperty string UpLabel=UP
My code that processes both:
New-UDChart -Title "Whats Up-Down" -endpoint {
$UpDown | Out-UDChartData -Dataset @(
New-UDChartDataset -DataProperty Up -label "Up"
New-UDChartDataset -DataProperty Down -Label "Down"
) -LabelProperty ""
} -type pie -AutoRefresh -RefreshInterval 60
New-UDChart -Title "Whats Up-Down" -endpoint {
$WhatsUpDown | Out-UDChartData -Dataset @(
New-UDChartDataset -DataProperty IsOn -Label "IsOn"
) -LabelProperty ""
} -type pie -AutoRefresh -RefreshInterval 60
This is what the charts look like:
Thank you so much for taking a look at this. I am sure I am not understanding what the dataset needs.