yeah the basic version works no problem. but I just cannot seem to incorporate it into my code, itās the same error
New-UDDashboard : Parameter set cannot be resolved using the specified named parameters.
At C:\scripts\VMUG\BSOL-VMUG.ps1:51 char:14specified named parameters.
+ ... Dashboard = New-UDDashboard -Pages $pages -NavBarColor "#FF252525" - ...
Hereās the dashboard code
$pages = @()
$pages += New-UDPage -Name "Cluster" -Icon cloud -Content { New-UDCard }
$pages += New-UDPage -Name "VCSA" -Icon server -Content { New-UDCard }
$Dashboard = New-UDDashboard -Pages $pages -NavBarColor "#FF252525" -NavBarFontColor "#cbd9ef" -BackgroundColor "#303235" -FontColor "#cbd9ef" -Content {
New-UdRow {
New-UdColumn -Size 2 -Content {
New-UDCounter -Title "Number of Hosts" -TextSize Medium -TextAlignment center -Icon cloud -AutoRefresh -RefreshInterval 60 -BackgroundColor "#1d6ef2" -FontColor "#cbd9ef" -Endpoint {
$hosts = (Invoke-RestMethod -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/host" -Method GET -Headers $session).value.count
$hosts
}
}
New-UdColumn -Size 2 -Content {
New-UDCounter -Title "Number of Datastores" -TextSize Medium -TextAlignment center -Icon bitbucket -AutoRefresh -RefreshInterval 60 -BackgroundColor "#ad1fc4" -FontColor "#cbd9ef" -Endpoint {
$datastores = (Invoke-RestMethod -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore" -Method GET -Headers $session).value.count
$datastores
}
}
New-UdColumn -Size 2 -Content {
New-UDCounter -Title "Total VM count" -TextSize Medium -TextAlignment center -AutoRefresh -Icon server -RefreshInterval 60 -BackgroundColor "#1cc941" -FontColor "#cbd9ef" -Endpoint {
$vms = (Invoke-RestMethod -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/vm" -Method GET -Headers $session).value.count
$vms
}
}
New-UdColumn -Size 6 -Content {
New-UDGrid -Title "VCSA Info" -FontColor "#cbd9ef" -BackgroundColor "#303235" -Headers @("product", "version", "build") -Properties @("product", "version", "build") -AutoRefresh -RefreshInterval 60 -Endpoint {
(Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/appliance/system/version").value | Out-UDGridData
}
}
}
New-UdRow {
New-UDColumn -Size 4 -Content {
New-UDChart -Title (Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore/datastore-327").value.name -Type Pie -AutoRefresh -RefreshInterval 60 -BackgroundColor "#303235" -FontColor "#cbd9ef" -Endpoint {
$Repo = @();
$Repo += [PSCustomObject] @{ "Space" = "Capacity GB"; "Count" = [Math]::round((((Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore?filter.datastores=datastore-327").value.Capacity) / 1073741824), 0)}
$Repo += [PSCustomObject] @{ "Space" = "Free GB"; "Count" = [Math]::round((((Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore?filter.datastores=datastore-327").value.free_space) / 1073741824), 0)}
$Repo | Out-UDChartData -LabelProperty Space -Dataset @(New-UDChartDataset -DataProperty Count -Label "GB" -BackgroundColor @("#24ad1d", "#4085ed") -HoverBackgroundColor @("#24ad1d", "#4085ed"))
} -Options @{cutoutPercentage = 50}
}
New-UDColumn -Size 4 -Content {
New-UDChart -Title (Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore/datastore-347").value.name -Type Doughnut -AutoRefresh -RefreshInterval 60 -BackgroundColor "#303235" -FontColor "#cbd9ef" -Endpoint {
$Repo = @();
$Repo += [PSCustomObject] @{ "Space" = "Capacity GB"; "Count" = [Math]::round((((Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore?filter.datastores=datastore-347").value.Capacity) / 1073741824), 0)}
$Repo += [PSCustomObject] @{ "Space" = "Free GB "; "Count" = [Math]::round((((Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore?filter.datastores=datastore-347").value.free_space) / 1073741824), 0)}
$Repo | Out-UDChartData -LabelProperty Space -Dataset @(New-UDChartDataset -DataProperty Count -Label "GB" -BackgroundColor @("#24ad1d", "#4085ed") -HoverBackgroundColor @("#24ad1d", "#4085ed"))
} -Options @{cutoutPercentage = 50}
}
New-UDColumn -Size 4 -Content {
New-UDChart -Title (Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore/datastore-348").value.name -Type Doughnut -AutoRefresh -RefreshInterval 60 -BackgroundColor "#303235" -FontColor "#cbd9ef" -Endpoint {
$Repo = @();
$Repo += [PSCustomObject] @{ "Space" = "Capacity"; "Count" = [Math]::round((((Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore?filter.datastores=datastore-348").value.Capacity) / 1073741824), 0)}
$Repo += [PSCustomObject] @{ "Space" = "Free"; "Count" = [Math]::round((((Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/datastore?filter.datastores=datastore-348").value.free_space) / 1073741824), 0)}
$Repo | Out-UDChartData -LabelProperty Space -Dataset @(New-UDChartDataset -DataProperty Count -Label "GB" -BackgroundColor @("#24ad1d", "#4085ed") -HoverBackgroundColor @("#24ad1d", "#4085ed"))
} -Options @{cutoutPercentage = 50}
}
}
New-UDRow {
New-UDColumn -Size 6 -Content {
New-UDGrid -Title "VM Inventory" -FontColor "#cbd9ef" -BackgroundColor "#303235" -Headers @("Name", "Memory", "CPU", "State") -Properties @("name", "memory_size_MiB", "cpu_count", "power_state") -AutoRefresh -RefreshInterval 60 -Endpoint {
(Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/vm").value | Out-UDGridData
}
}
New-UDColumn -Size 6 -Content {
New-UDGrid -Title "Networks" -FontColor "#cbd9ef" -BackgroundColor "#303235" -Headers @("Name", "type") -Properties @("name", "type") -AutoRefresh -RefreshInterval 60 -Endpoint {
(Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/vcenter/network").value | Out-UDGridData
}
}
}
New-UDRow {
New-UDColumn -Size 6 -Content {
New-UDGrid -Title "vMon services" -FontColor "#cbd9ef" -BackgroundColor "#303235" -Headers @("Key", "Startup", "State", "Health") -Properties @("key", "value.startup_type", "value.state", "value.health") -AutoRefresh -RefreshInterval 60 -Endpoint {
(Invoke-RestMethod -headers $session -method GET -uri "https://cd-lab-vc1.cragdoo.co.uk/rest/appliance/vmon/service").value | Out-UDGridData
}
}
}
} -EndpointInitialization $Initialization
Start-UDDashboard -Dashboard $Dashboard -name BMGM1 -Port 10001 -AutoReload
It doe run the code, but only shows me the exampl dashboard, not my dashboard