Missing content from Grid Output


#1

Greetings, I am trying to get a list of installed features from a server remotely and outputting to a UDGrid. The script runs without error and produces content that can be seen in the Variable, but is never shows up on the grid. Funny thing is that there is a Next/Previous button that shows up at the bottom of the page. It’[s like the content is there…just invisible.

Here’s the code:

$Page2 = New-UDPage -Name “Features and Software” -Icon windows -Content {
New-UDGrid -Title “Installed Features” -Headers @(“Installed_Features”) -Properties @(“Installed_Features”) -Endpoint { $SFeature | Out-UDGridData } -FontColor Black


#2

I can’t speak as to why this is the case but I had some empty columns and did the following to get it to render the string in a grid, the .ToString() seemed to do it.

                DisplayName = $_.DisplayName.ToString().Trim()
                Status = $_.Status.ToString()

So the full block looked something like:

New-UdGrid -Title “Services” -Headers @(“DisplayName”, “Status”) -Properties @(“DisplayName”, “Status”) -AutoRefresh -RefreshInterval 60 -Endpoint {
$Services = Get-Service -ComputerName $ComputerName
Services | Foreach-Object { [PSCustomObject]@{ DisplayName = .DisplayName.ToString().Trim()
Status = $
.Status.ToString()
}
} | Out-UDGridData


#3

Hey … That worked Perfectly. Thanks Much!!