Examples/Create-AllClientHealthWidgets.ps1
$IACategoryObject = New-IACategoryObject -Name 'ClientHealth' $IACategory = New-IACategory -IACategory $IACategoryObject -Passthru $IAViewObject = New-IAViewObject -Name 'ClientHealth' -IACategory $IACategory $IAView = New-IAView -IAView $IAViewObject -Passthru $IAGroupObject = New-IAGroupObject -Title 'ClientHealth' -IAView $IAView $IAGroup = New-IAGroup -IAGroup $IAGroupObject -Passthru #$IAGroup = Get-IAGroup -Name ClientHealth -Verbose $WidgetTypeDonut = Get-IAWidgetType -Name Donut $WidgetTypeNumberDeviation = Get-IAWidgetType -Name Number $AllSystemsCollectionId = (Get-IACollection -Name 'All Systems').Id #### CHCompliance $WidgetTemplate = $null $IAConfigurationDataModel = $null $IAConfiguration = $null $IAWidgetObject = $null $IAWidget = $null $WidgetTemplate = Get-IAWidgetTemplate -Name 'Rodland Client Compliance' $IAConfigurationDataModel = Get-IAConfigurationDataModel -WidgetTemplateId $WidgetTemplate.Id <# Drivers Updates Services PendingReboot DNS WMI Bits WUA AdminShare Certificate ProvisioningMode StateMessages SoftwareMetering #> $IAConfigurationDataModel.DataModel.ComplianceType = 'Drivers' $IAConfigurationDataModel.DataModel.Days = 1000 $IAConfiguration = New-IAConfiguration -Name $IAConfigurationDataModel.Name -IAConfigurationDataModel $IAConfigurationDataModel.DataModel -CleanUpEmptyProperties -Passthru $IAWidgetObject = New-IAWidgetObject -IAGroup $IAGroup ` -IAWidgetTemplate $WidgetTemplate ` -IAWidgetType $WidgetTypeDonut ` -WidgetConfiguration $IAConfiguration $IAWidget = New-IAWidget -IAWidgetObject $IAWidgetObject -PassThru -CreateDataValueFieldMaps #### #### ChComputerDeviation $WidgetTemplate = $null $IAConfigurationDataModel = $null $IAConfiguration = $null $IAWidgetObject = $null $IAWidget = $null $WidgetTemplate = Get-IAWidgetTemplate -Filter "Description eq 'Rodland Client State (Active Clients)'" $IAConfigurationDataModel = Get-IAConfigurationDataModel -WidgetTemplateId $WidgetTemplate.Id $IAConfigurationDataModel.DataModel.Days = 1000 $IAConfiguration = New-IAConfiguration -Name $IAConfigurationDataModel.Name -IAConfigurationDataModel $IAConfigurationDataModel.DataModel -CleanUpEmptyProperties -Passthru $IAWidgetObject = New-IAWidgetObject -IAGroup $IAGroup ` -IAWidgetTemplate $WidgetTemplate ` -IAWidgetType $WidgetTypeDonut ` -WidgetConfiguration $IAConfiguration $IAWidget = New-IAWidget -IAWidgetObject $IAWidgetObject -PassThru -CreateDataValueFieldMaps #### |