InforcerCommunity.Format.ps1xml

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <ViewDefinitions>

    <!-- TENANT -->
    <View>
      <Name>InforcerCommunity.Tenant.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.Tenant</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>ClientTenantId</Label><PropertyName>ClientTenantId</PropertyName></ListItem>
              <ListItem><Label>MsTenantId</Label><PropertyName>MsTenantId</PropertyName></ListItem>
              <ListItem><Label>TenantFriendlyName</Label><PropertyName>TenantFriendlyName</PropertyName></ListItem>
              <ListItem><Label>TenantDnsName</Label><PropertyName>TenantDnsName</PropertyName></ListItem>
              <ListItem><Label>licenses</Label><PropertyName>licenses</PropertyName></ListItem>
              <ListItem><Label>SecureScore</Label><PropertyName>SecureScore</PropertyName></ListItem>
              <ListItem><Label>IsBaseline</Label><PropertyName>IsBaseline</PropertyName></ListItem>
              <ListItem><Label>LastBackupTimestamp</Label><PropertyName>LastBackupTimestamp</PropertyName></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- BASELINE -->
    <View>
      <Name>InforcerCommunity.Baseline.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.Baseline</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>BaselineName</Label><PropertyName>BaselineName</PropertyName></ListItem>
              <ListItem><Label>BaselineId</Label><PropertyName>BaselineId</PropertyName></ListItem>
              <ListItem><Label>Owner</Label><PropertyName>BaselineTenantFriendlyName</PropertyName></ListItem>
              <ListItem><Label>OwnerTenantId</Label><PropertyName>BaselineClientTenantId</PropertyName></ListItem>
              <ListItem><Label>Members</Label><ScriptBlock>if ($_.members -and $_.members.Count -gt 0) { ($_.members | ForEach-Object { "$($_.TenantFriendlyName) ($($_.ClientTenantId))" }) -join ', ' } else { '(none)' }</ScriptBlock></ListItem>
              <ListItem><Label>AlignedThreshold</Label><PropertyName>AlignedThreshold</PropertyName></ListItem>
              <ListItem><Label>SemiAlignedThreshold</Label><PropertyName>SemiAlignedThreshold</PropertyName></ListItem>
              <ListItem><Label>Mode</Label><ScriptBlock>$_.mode</ScriptBlock></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- POLICY -->
    <View>
      <Name>InforcerCommunity.Policy.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.Policy</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>PolicyName</Label><PropertyName>PolicyName</PropertyName></ListItem>
              <ListItem><Label>Product</Label><PropertyName>Product</PropertyName></ListItem>
              <ListItem><Label>PrimaryGroup</Label><PropertyName>PrimaryGroup</PropertyName></ListItem>
              <ListItem><Label>SecondaryGroup</Label><PropertyName>SecondaryGroup</PropertyName></ListItem>
              <ListItem><Label>Platform</Label><PropertyName>Platform</PropertyName></ListItem>
              <ListItem><Label>ReadOnly</Label><PropertyName>ReadOnly</PropertyName></ListItem>
              <ListItem><Label>Tags</Label><ScriptBlock>$_.Tags</ScriptBlock></ListItem>
              <ListItem><Label>PolicyData</Label><ScriptBlock>if ($_.policyData) { $_.policyData | ConvertTo-Json -Depth 3 -Compress } else { '' }</ScriptBlock></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- USER SUMMARY -->
    <View>
      <Name>InforcerCommunity.UserSummary.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.UserSummary</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <Label>DisplayName</Label>
                <PropertyName>DisplayName</PropertyName>
              </ListItem>
              <ListItem>
                <Label>UserPrincipalName</Label>
                <PropertyName>UserPrincipalName</PropertyName>
              </ListItem>
              <ListItem>
                <Label>UserType</Label>
                <PropertyName>UserType</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Department</Label>
                <PropertyName>Department</PropertyName>
              </ListItem>
              <ListItem>
                <Label>AssignedLicenses</Label>
                <PropertyName>AssignedLicenses</PropertyName>
              </ListItem>
              <ListItem>
                <Label>IsGlobalAdmin</Label>
                <PropertyName>IsGlobalAdmin</PropertyName>
              </ListItem>
              <ListItem>
                <Label>IsMfaCapable</Label>
                <PropertyName>IsMfaCapable</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- ALIGNMENT SCORE (Table format of Get-InforcerAlignmentDetails) -->
    <View>
      <Name>InforcerCommunity.AlignmentScore.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.AlignmentScore</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>Tenant</Label><PropertyName>TargetTenantFriendlyName</PropertyName></ListItem>
              <ListItem><Label>TenantId</Label><PropertyName>TargetTenantClientTenantId</PropertyName></ListItem>
              <ListItem><Label>AlignmentScore</Label><PropertyName>AlignmentScore</PropertyName></ListItem>
              <ListItem><Label>BaselineName</Label><PropertyName>BaselineName</PropertyName></ListItem>
              <ListItem><Label>LastComparisonDateTime</Label><PropertyName>LastComparisonDateTime</PropertyName></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- USER DETAIL -->
    <View>
      <Name>InforcerCommunity.User.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.User</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <Label>DisplayName</Label>
                <PropertyName>DisplayName</PropertyName>
              </ListItem>
              <ListItem>
                <Label>UserPrincipalName</Label>
                <PropertyName>UserPrincipalName</PropertyName>
              </ListItem>
              <ListItem>
                <Label>UserType</Label>
                <PropertyName>UserType</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Department</Label>
                <PropertyName>Department</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Mail</Label>
                <PropertyName>Mail</PropertyName>
              </ListItem>
              <ListItem>
                <Label>AccountEnabled</Label>
                <PropertyName>AccountEnabled</PropertyName>
              </ListItem>
              <ListItem>
                <Label>IsGlobalAdmin</Label>
                <PropertyName>IsGlobalAdmin</PropertyName>
              </ListItem>
              <ListItem>
                <Label>IsCloudOnly</Label>
                <PropertyName>IsCloudOnly</PropertyName>
              </ListItem>
              <ListItem>
                <Label>IsMfaRegistered</Label>
                <PropertyName>IsMfaRegistered</PropertyName>
              </ListItem>
              <ListItem>
                <Label>RiskLevel</Label>
                <PropertyName>RiskLevel</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- ALIGNMENT DETAIL POLICY (per-policy rows with -BaselineId) -->
    <View>
      <Name>InforcerCommunity.AlignmentDetailPolicy.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.AlignmentDetailPolicy</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><PropertyName>PolicyName</PropertyName></ListItem>
              <ListItem><PropertyName>AlignmentStatus</PropertyName></ListItem>
              <ListItem><PropertyName>Product</PropertyName></ListItem>
              <ListItem><PropertyName>PrimaryGroup</PropertyName></ListItem>
              <ListItem><PropertyName>SecondaryGroup</PropertyName></ListItem>
              <ListItem><PropertyName>InforcerPolicyTypeName</PropertyName></ListItem>
              <ListItem><PropertyName>Tags</PropertyName></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- AUDIT EVENT -->
    <View>
      <Name>InforcerCommunity.AuditEvent.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.AuditEvent</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>Id</Label><ScriptBlock>$_.id</ScriptBlock></ListItem>
              <ListItem><Label>EventType</Label><PropertyName>EventType</PropertyName></ListItem>
              <ListItem><Label>Code</Label><PropertyName>Code</PropertyName></ListItem>
              <ListItem><Label>User</Label><PropertyName>User</PropertyName></ListItem>
              <ListItem><Label>Timestamp</Label><PropertyName>Timestamp</PropertyName></ListItem>
              <ListItem><Label>Message</Label><PropertyName>Message</PropertyName></ListItem>
              <ListItem><Label>ClientIpv4</Label><PropertyName>ClientIpv4</PropertyName></ListItem>
              <ListItem><Label>UserName</Label><PropertyName>UserName</PropertyName></ListItem>
              <ListItem><Label>UserDisplayName</Label><PropertyName>UserDisplayName</PropertyName></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- GROUP SUMMARY -->
    <View>
      <Name>InforcerCommunity.GroupSummary.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.GroupSummary</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <Label>DisplayName</Label>
                <PropertyName>DisplayName</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Id</Label>
                <PropertyName>Id</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Description</Label>
                <PropertyName>Description</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Mail</Label>
                <PropertyName>Mail</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Visibility</Label>
                <PropertyName>Visibility</PropertyName>
              </ListItem>
              <ListItem>
                <Label>GroupTypes</Label>
                <ScriptBlock>if ($_.groupTypes) { ($_.groupTypes) -join ', ' } else { '' }</ScriptBlock>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- GROUP DETAIL -->
    <View>
      <Name>InforcerCommunity.Group.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.Group</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <Label>DisplayName</Label>
                <PropertyName>DisplayName</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Id</Label>
                <PropertyName>Id</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Description</Label>
                <PropertyName>Description</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Mail</Label>
                <PropertyName>Mail</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Visibility</Label>
                <PropertyName>Visibility</PropertyName>
              </ListItem>
              <ListItem>
                <Label>GroupTypes</Label>
                <ScriptBlock>if ($_.groupTypes) { ($_.groupTypes) -join ', ' } else { '' }</ScriptBlock>
              </ListItem>
              <ListItem>
                <Label>MailEnabled</Label>
                <PropertyName>MailEnabled</PropertyName>
              </ListItem>
              <ListItem>
                <Label>CreatedDateTime</Label>
                <PropertyName>CreatedDateTime</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Members</Label>
                <ScriptBlock>if ($_.members -and $_.members.Count -gt 0) { ($_.members | ForEach-Object { $_.displayName }) -join ', ' } else { '(none)' }</ScriptBlock>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- ROLE -->
    <View>
      <Name>InforcerCommunity.Role.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.Role</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <Label>DisplayName</Label>
                <PropertyName>DisplayName</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Id</Label>
                <PropertyName>Id</PropertyName>
              </ListItem>
              <ListItem>
                <Label>Description</Label>
                <PropertyName>Description</PropertyName>
              </ListItem>
              <ListItem>
                <Label>IsBuiltIn</Label>
                <PropertyName>IsBuiltIn</PropertyName>
              </ListItem>
              <ListItem>
                <Label>IsEnabled</Label>
                <PropertyName>IsEnabled</PropertyName>
              </ListItem>
              <ListItem>
                <Label>IsPrivileged</Label>
                <PropertyName>IsPrivileged</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- ASSESSMENT -->
    <View>
      <Name>InforcerCommunity.Assessment.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.Assessment</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <PropertyName>Name</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>Id</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>Description</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>AssessmentType</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>Tags</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>LastUpdated</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>Created</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- ASSESSMENT CHECK -->
    <View>
      <Name>InforcerCommunity.AssessmentCheck.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.AssessmentCheck</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <PropertyName>Status</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>name</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>category</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>subCategory</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>importance</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>ObjectsEvaluated</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>FindingsMessage</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>Scores</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- REPORT TYPE (catalog entry from /beta/reports/types) -->
    <View>
      <Name>InforcerCommunity.ReportType.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.ReportType</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>Key</Label><PropertyName>Key</PropertyName></ListItem>
              <ListItem><Label>Name</Label><PropertyName>Name</PropertyName></ListItem>
              <ListItem><Label>Description</Label><PropertyName>Description</PropertyName></ListItem>
              <ListItem><Label>Collatable</Label><PropertyName>Collatable</PropertyName></ListItem>
              <ListItem><Label>OutputFormats</Label><ScriptBlock>
                $formats = $null
                foreach ($p in 'SupportedOutputFormats','OutputFormats','supportedOutputFormats','outputFormats','supportedFormats','formats') {
                    if ($_.PSObject.Properties[$p] -and $null -ne $_.PSObject.Properties[$p].Value) {
                        $formats = $_.PSObject.Properties[$p].Value
                        break
                    }
                }
                if ($formats) { ($formats -join ', ') } else { '' }
              </ScriptBlock></ListItem>
              <ListItem><Label>Tags</Label><PropertyName>Tags</PropertyName></ListItem>
              <ListItem><Label>Parameters</Label><ScriptBlock>
                $p = $_.PSObject.Properties['RequiredParameters']
                if (-not $p) { $p = $_.PSObject.Properties['Parameters'] }
                if (-not $p) { $p = $_.PSObject.Properties['requiredParameters'] }
                if (-not $p) { $p = $_.PSObject.Properties['parameters'] }
                $rendered = '(none)'
                if ($p -and $null -ne $p.Value) {
                    $keys = foreach ($entry in @($p.Value)) {
                        if ($entry -is [string]) { $entry }
                        elseif ($entry.PSObject.Properties['key']) { $entry.PSObject.Properties['key'].Value }
                        elseif ($entry.PSObject.Properties['name']) { $entry.PSObject.Properties['name'].Value }
                    }
                    $filtered = $keys | Where-Object { $_ }
                    if ($filtered) { $rendered = ($filtered -join ', ') }
                }
                $rendered
              </ScriptBlock></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- REPORT RUN (run metadata from /beta/reports/runs) -->
    <View>
      <Name>InforcerCommunity.ReportRun.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.ReportRun</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>RunId</Label><PropertyName>RunId</PropertyName></ListItem>
              <ListItem><Label>Status</Label><PropertyName>Status</PropertyName></ListItem>
              <ListItem><Label>ReportTypes</Label><ScriptBlock>
                $p = $_.PSObject.Properties['ReportTypes']
                if (-not $p) { $p = $_.PSObject.Properties['reportTypes'] }
                if ($p -and $null -ne $p.Value) { @($p.Value) -join ', ' } else { '' }
              </ScriptBlock></ListItem>
              <ListItem><Label>OutputFormats</Label><ScriptBlock>
                $p = $_.PSObject.Properties['OutputFormats']
                if (-not $p) { $p = $_.PSObject.Properties['outputFormats'] }
                if ($p -and $null -ne $p.Value) { @($p.Value) -join ', ' } else { '' }
              </ScriptBlock></ListItem>
              <ListItem><Label>TriggeredByType</Label><PropertyName>TriggeredByType</PropertyName></ListItem>
              <ListItem><Label>CreatedAt</Label><PropertyName>CreatedAt</PropertyName></ListItem>
              <ListItem><Label>CompletedAt</Label><PropertyName>CompletedAt</PropertyName></ListItem>
              <ListItem><Label>OutputCount</Label><PropertyName>OutputCount</PropertyName></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- REPORT RUN RESULT (per-output saved-file result from Invoke-InforcerReport) -->
    <View>
      <Name>InforcerCommunity.ReportRunResult.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.ReportRunResult</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>RunId</Label><PropertyName>RunId</PropertyName></ListItem>
              <ListItem><Label>ReportType</Label><PropertyName>ReportType</PropertyName></ListItem>
              <ListItem><Label>OutputFormat</Label><PropertyName>OutputFormat</PropertyName></ListItem>
              <ListItem><Label>TenantId</Label><PropertyName>TenantId</PropertyName></ListItem>
              <ListItem><Label>FilePath</Label><PropertyName>FilePath</PropertyName></ListItem>
              <ListItem><Label>FileName</Label><PropertyName>FileName</PropertyName></ListItem>
              <ListItem><Label>FileSize</Label><PropertyName>FileSize</PropertyName></ListItem>
              <ListItem><Label>ContentType</Label><PropertyName>ContentType</PropertyName></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <!-- REPORT OUTPUT (output metadata from /beta/reports/runs/{id}/outputs)
         Fields verified against api-uk.inforcer.com: id, reportType, tenantId, format, sizeBytes.
         The server does not return fileName / contentType on output records — those come from
         the download endpoint's Content-Disposition / Content-Type headers and are surfaced
         on the ReportRunResult object emitted by Invoke-InforcerReport / Save-InforcerReportOutput. -->
    <View>
      <Name>InforcerCommunity.ReportOutput.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.ReportOutput</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>OutputId</Label><PropertyName>OutputId</PropertyName></ListItem>
              <ListItem><Label>RunId</Label><PropertyName>RunId</PropertyName></ListItem>
              <ListItem><Label>ReportType</Label><PropertyName>ReportType</PropertyName></ListItem>
              <ListItem><Label>OutputFormat</Label><PropertyName>OutputFormat</PropertyName></ListItem>
              <ListItem><Label>TenantId</Label><PropertyName>TenantId</PropertyName></ListItem>
              <ListItem><Label>FileSize</Label><PropertyName>FileSize</PropertyName></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <View>
      <Name>InforcerCommunity.SecureScore.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.SecureScore</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>CurrentScore</Label><PropertyName>CurrentScore</PropertyName></ListItem>
              <ListItem><Label>MaxScore</Label><PropertyName>MaxScore</PropertyName></ListItem>
              <ListItem><Label>CurrentScorePercentage</Label><ScriptBlock>if ($null -ne $_.currentScorePercentage) { '{0:F2}' -f [double]$_.currentScorePercentage } else { '' }</ScriptBlock></ListItem>
              <ListItem><Label>LicensedUserCount</Label><PropertyName>LicensedUserCount</PropertyName></ListItem>
              <ListItem><Label>EnabledServices</Label><ScriptBlock>if ($_.enabledServices) { ($_.enabledServices) -join ', ' } else { '' }</ScriptBlock></ListItem>
              <ListItem><Label>ScoreHistory</Label><ScriptBlock>
                $s = @($_.scores)
                if ($s.Count -eq 0) { return '(none)' }
                $sorted = $s | Sort-Object { [datetime]$_.createdDateTime }
                $inv = [System.Globalization.CultureInfo]::InvariantCulture
                $first = ([datetime]$sorted[0].createdDateTime).ToString('yyyy-MM-dd', $inv)
                $last = ([datetime]$sorted[-1].createdDateTime).ToString('yyyy-MM-dd', $inv)
                "$($s.Count) day(s), $first → $last (latest $($sorted[-1].currentScore) / $($sorted[-1].maxScore))"
              </ScriptBlock></ListItem>
              <ListItem><Label>ControlCategoryScores</Label><ScriptBlock>
                $c = @($_.controlCategoryScores)
                if ($c.Count -eq 0) { return '(none)' }
                ($c | ForEach-Object { "$($_.controlCategory): $($_.currentScore)/$($_.maxScore)" }) -join ', '
              </ScriptBlock></ListItem>
              <ListItem><Label>ControlProfilesCount</Label><ScriptBlock>if ($_.controlProfiles) { @($_.controlProfiles).Count } else { 0 }</ScriptBlock></ListItem>
              <ListItem><Label>TopRecommendations</Label><ScriptBlock>
                $cp = @($_.controlProfiles) | Where-Object { $_.scoreDifference -gt 0 } | Sort-Object -Property @{ Expression = 'scoreDifference'; Descending = $true } | Select-Object -First 3
                if (-not $cp) { return '(none - all controls maxed out)' }
                ($cp | ForEach-Object { "+$($_.scoreDifference) $($_.title)" }) -join "`n"
              </ScriptBlock></ListItem>
              <ListItem><Label>Hint</Label><ScriptBlock>'Use $obj.ControlProfiles | Sort-Object ScoreDifference -Descending for the full list. .Scores / .ControlCategoryScores[0].HistoricScores for the history.'</ScriptBlock></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

    <View>
      <Name>InforcerCommunity.SecureScoreControlProfile.Default</Name>
      <ViewSelectedBy>
        <TypeName>InforcerCommunity.SecureScoreControlProfile</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem><Label>Title</Label><PropertyName>title</PropertyName></ListItem>
              <ListItem><Label>ControlCategory</Label><PropertyName>controlCategory</PropertyName></ListItem>
              <ListItem><Label>Service</Label><PropertyName>service</PropertyName></ListItem>
              <ListItem><Label>Score</Label><ScriptBlock>"$($_.currentScore) / $($_.maxScore) (+$($_.scoreDifference) if fixed)"</ScriptBlock></ListItem>
              <ListItem><Label>RemediationImpact</Label><PropertyName>remediationImpact</PropertyName></ListItem>
              <ListItem><Label>ActionUrl</Label><PropertyName>actionUrl</PropertyName></ListItem>
              <ListItem><Label>Id</Label><PropertyName>id</PropertyName></ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>

  </ViewDefinitions>
</Configuration>