scripts/New-IdentityNowIdentityProfilesReport.ps1

function New-IdentityNowIdentityProfilesReport {
    <#
.SYNOPSIS
Generate a HTML Report of IdentityNow Identity Profiles and export each Identity Profile config.

.DESCRIPTION
Generate a HTML Report of IdentityNow Identity Profiles and export each Identity Profile config.

.PARAMETER reportPath
(required) Folder to output configuration to. e.g c:\reports

.PARAMETER reportImagePath
(optional) Image to use for the HTML report. Default is the SailPointIdentityNow Log
Recommended size 240px wide x 82px high.
e.g C:\Images\SailPoint IdentityNow 240px.png

.EXAMPLE
New-IdentityNowIdentityProfilesReport -reportPath 'C:\Reports'

.EXAMPLE
New-IdentityNowIdentityProfilesReport -reportPath 'C:\Reports' -reportImagePath 'C:\Images\myCompanyLogo-240px.png'

.LINK
http://darrenjrobinson.com/sailpoint-identitynow

#>

    [cmdletbinding()]
    param(
        [Parameter(Mandatory = $true, ValueFromPipeline = $true)]
        [string]$reportPath,
        [Parameter(Mandatory = $false, ValueFromPipeline = $true)]
        [string]$reportImagePath 
    )

    # Document IdentityNow Source Configuration
    $orgName = $IdentityNowConfiguration.orgName
    
    if ($reportImagePath) {
        try {
            if ($PSVersionTable.PSVersion.Major -le 5) {
                $ImageData = [Convert]::ToBase64String((Get-Content $reportImagePath -Encoding Byte))
            }
            elseif ($PSVersionTable.PSVersion.Major -gt 5) {
                $ImageData = [Convert]::ToBase64String((Get-Content $reportImagePath -AsByteStream))
            }
            $ImageFile = Get-Item $reportImagePath
            $ImageType = $ImageFile.Extension.Substring(1) #strip off the leading .
            $ImageTag = "<Img src='data:image/$($ImageType);base64,$($ImageData)' Alt='$($ImageFile.Name)' width='240' height='82' `hspace=10>"
        }
        catch {
            Write-Error "Report Image Path/Filename not found. $($_)"
            break 
        }
    }
    else {
        $ImageData = 'iVBORw0KGgoAAAANSUhEUgAAAPAAAABSCAYAAABqgVl3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALEoAACxKAXd6dE0AACCISURBVHhe7Z0HeBRVF4a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x1AB4WyLHxYMxNCB8vQtMpWPCi3gAoLC4jBn4V6s3/A7kJwG9goUPncVs8wsxhXbFasBE7+K/yuIkdn8XKxtuaoJuvVuickTeqBlo+p8OxmZykilEHBRgkJjsfPQZRw5cg1n/wrGY9ZGzAY5sIoqdQGzpieW52qP5g2qoVOnRujl3wSN63rxTWRkKjuVTsBSpKRn4UFkIhIT0/ib3thPsrYyh7enPRyZtZaR+ZfyrxCwjMx/lbJrp5GRkXnmyAKWkanEyAKWkanEyAKWkanEyAKWkanEyAKWkanEyAKWkanEyAKWkam0AP8HEOP237sO4mAAAAAASUVORK5CYII='

        $ImageTag = "<Img src='data:image/png;base64,$($ImageData)' Alt='SailPoint IdentityNow' width='240' height='82' hspace=10>"
    }
    
    $reportDate = get-date -format "dd-MMM-yyyy HH-mm" 
    # Create Folder for Output with Report Date
    $dir = "$($reportPath)\$($reportDate)" 
    if (!(Test-Path -Path $dir )) { 
        New-Item -ItemType directory -Path $dir | out-null 
        Write-Output "$($dir) Report output directory created."
    } 

    $htmlFragments = $null 
    $IdentityProfiles = Get-IdentityNowProfile 
    if ($IdentityProfiles) {
        write-output "$($IdentityProfiles.Count) Identity Profiles found"
    }
    else {
        Write-Error "Check configuration of the SailPointIdentityNow PowerShell Module. No Identity Profiles found. "
        break 
    }

    # Headings and Title
    $top = @"
    <center>
        <h1>SailPoint IdentityNow Identity Profiles Report</h1>
        <h2>Organisation - `'$($orgName.ToUpper())`'</h2>
        <h3>`'$($IdentityProfiles.Count)`' Profiles found<h3>
        <b><center>$ImageTag</center></b>
    </center>
"@

    $htmlFragments += $top

    foreach ($idnProfile in $IdentityProfiles) {
        $profileDetails = @()
        write-host -ForegroundColor Green "Processing Identity Profile: $($idnProfile.name)"

        if ($idnProfile) {
            # Output Identity Profile to File
            $idnProfile | Export-Clixml -Path "$($dir)\$($orgName)-$($idnProfile.name)-Details-$($reportDate).xml"         
        }

        # Profile Title
        $H3Text = "$($idnProfile.name)"
        $div = $H3Text.Replace(" ", "_")
        $htmlFragments += "<a href='javascript:toggleDiv(""$div"");' title='click to collapse or expand this section'><center><h3>$H3Text</h3></center></a><div id=""$div"" style=""display: none;"">"
            
        # Get Identity Profile
        $profile = Get-IdentityNowProfile -ID $idnProfile.id 
            
        $ProfileTemplate = [pscustomobject][ordered]@{ 
            'Identity Attribute' = $null 
            Source               = $null 
            'Source Attribute'   = $null  
            Transform            = $null  
            Type                 = $null                     
        } 
        
        $transforms = $null 
        $transforms = $profile.attributeConfig.attributeTransforms | where-object { $null -eq $_.attributes.applicationId } | select-object 

        foreach ($attr in $profile.attributeConfig.attributeTransforms.attributeName) {
            $attributes = $profile.attributeConfig.attributeTransforms | Select-Object | Where-Object { $_.attributeName -eq $attr }
            foreach ($mappingAttr in $attributes.attributes) {
                write-host "$($mappingAttr.sourceName) $($mappingAttr.attributeName)"
                $profileMapping = $ProfileTemplate.PsObject.Copy()
                $profileMapping.'Identity Attribute' = $attr
                $profileMapping.Source = $mappingAttr.sourceName
                $profileMapping.'Source Attribute' = $mappingAttr.attributeName  
                
                if ($transforms) {
                    if ($transforms.attributeName.Contains($attr)) { 
                        $details = $null 
                        $details = $transforms | where-object { $_.attributeName -eq $attr } | Select-Object -Property attributes, type
                        $profileMapping.Transform = $details.attributes.id
                        $profileMapping.Type = $details.type
                    } 
                }
            }
            $profileDetails += $profileMapping
        }
                        
        # Profile Details
        $H4Text = "$($idnProfile.name) Details"
        $div = $H4Text.Replace(" ", "_")
        $htmlFragments += "<a href='javascript:toggleDiv(""$div"");' title='click to collapse or expand this section'><center><h4>$H4Text</h4></center></a><div id=""$div"" style=""display: none;"">"        
        $htmlFragments += "<center>"                                                                                                                                                  
        $htmlFragments += $profileDetails | ConvertTo-Html 
        $htmlFragments += "</center>"
        $htmlFragments += "</div>"
        $htmlFragments += "</div>"     
    }     

    # Footer
    $htmlFragments += "<center><p class='footer'>Report Generated $($reportDate)</p></center>"
    # Header
    $head = @"
<Title>SailPoint IdentityNow Identity Profiles Report - $($orgName.ToUpper())</Title>
<style>
body {background-color:#ffffff; font:70%/1.5em Lato,sans-serif; padding:10px }
td,th {padding-left:8px}
th {color:black; background-color:cornflowerblue;}
table {border-spacing:1px; border-collapse:collapse; background:#F7F6F6; border-radius:6px; overflow:hidden; max-width:480px; width:70%; margin:0 auto; position:relative;}
table, tr, td, th {padding: 10px; margin: 0px ;white-space:pre; word-break:break-all; width:70%;}
tr:nth-child(even) {background-color:#dae5f4;}
tr:nth-child(odd) {background:#b8d1f3;}
thead tr {height:60px;background:#367AB1;color:#F5F6FA;font-size:1.2em;font-weight:700;text-transform:uppercase}
tbody tr {height:35px;border-bottom:1px solid #367AB1; word-break:break-all; text-transform:capitalize; font-size:1em;}
h1 {font-family:Tahoma;color:#A9A9A9;}
h2 {font-family:Tahoma;color:#6D7B8D;}
h3 {font-family:Tahoma;color:#6D7B8D;}
.alert {color: red;}
.footer {color:green; margin-left:10px; font-family:Tahoma; font-size:8pt; font-style:italic;}
.transparent {background-color:#ffffff;}
</style>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'>
</script>
<script type='text/javascript'>
function toggleDiv(divId) {
`$("#"+divId).toggle();
}
function toggleAll() {
var divs = document.getElementsByTagName('div');
for (var i = 0; i < divs.length; i++) {
var div = divs[i];
`$("#"+div.id).toggle();
}
}
</script>
"@


    # Output the Report
    $convertParams = @{ 
        head = $head 
        body = $htmlFragments
    }   
    convertto-html @convertParams | out-file -FilePath "$($dir)\$($IdentityNowConfiguration.orgName)-ProfilesConfigReport-$($reportDate).html"    
    write-output "Identity Profile(s) configuration report generated to $($dir)\$($IdentityNowConfiguration.orgName)-ProfilesConfigReport-$($reportDate).html"
}
# SIG # Begin signature block
# MIIoKwYJKoZIhvcNAQcCoIIoHDCCKBgCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBA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