Happy New Year !
I recently tried to display my server list within AD with includes Operating System and server name and enabled status and ip address. However I cannot seem to get the IP address and Operating system to be displayed.
I went with the code below:
$Dashboardtest17 = New-UDDashboard -Title “Hello, World!” -Content {
New-UDHeading -Text "Hello, World!" -Size 1
New-UdGrid -Title “Servers” -Headers @(“Name”, “OperatingSystem”, “Enabled”, “IPAddress”) -Properties @(“Name”, “OperatingSystem”, “Enabled”, “IPAddress”) -AutoRefresh -RefreshInterval 15 -Endpoint {
Get-ADComputer -Filter {OperatingSystem -like “Server”} | Out-UDGridData
Start-UDDashboard -Dashboard $Dashboardtest17 -Port 10003
###########################################################
Anything else I tried did not work so far I produced a react.js error.
$Dashboardtest17 = New-UDDashboard -Title “Hello, World!” -Content {
New-UDHeading -Text "Hello, World!" -Size 1
New-UdGrid -Title “Servers” -Headers @(“Name”, “OperatingSystem”, “Enabled”, “IPAddress”) -Properties @(“Name”, “OperatingSystem”, “Enabled”, “IPAddress”) -AutoRefresh -RefreshInterval 15 -Endpoint {
Get-ADComputer -Filter {OperatingSystem -like “Server”} -Properties OperatingSystem,IPv4Address | select Name,OperatingSystem,Enabled,IPAddress | Out-UDGridData
This procduces an error also
$DashboardTest15 = New-UDDashboard -Title “Hello World” -NavBarColor ‘#5a595a’-NavBarFontColor ‘#535353’ -Content {
New-UDHeading -Text “Hello World” -Size 2
New-UDGrid -Title “Process Information” -Headers @(“Name”, “Operating System”, “Enabled”, “IPAddress”) -Properties @(“Name”, “OperatingSystem”, “Enabled”, “IPv4Address”) -Endpoint {
Get-ADComputer -Filter {OperatingSystem -like “Server”} -Properties OperatingSystem,IPv4Address |ForEach-Object {
[PSCustomObject] @{
"Name" = $_.Name
"Operating System" = $_.OperatingSystem
"IPAdresss" = $_.IPv4Address
}
|Out-UDGridData
}
}
}