Last active
November 15, 2018 20:34
-
-
Save darrenjrobinson/57e656b28d83f7d9eb310c871f29531d to your computer and use it in GitHub Desktop.
Build a Collection of IdentityNow Roles, Entitlements and Access Profiles for inclusion in a Campaign. Supporting Blog Post can be found here https://blog.darrenjrobinson.com/creating-sailpoint-identitynow-certification-campaigns-using-powershell/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Campaign Inclusions from Identity Results | |
# Access Profiles, Roles and Entitlments | |
$inclusionList = @() | |
# ROLES | |
foreach ($role in $roles) { | |
$InclusionTemplate = [pscustomobject][ordered]@{ | |
id = $role | |
type = "ROLE" | |
} | |
$inclusionList += $InclusionTemplate | |
} | |
# ENTITLEMENTS | |
foreach ($entitlement in $entitlements) { | |
$InclusionTemplate = [pscustomobject][ordered]@{ | |
id = $entitlement | |
type = "ENTITLEMENT" | |
} | |
$inclusionList += $InclusionTemplate | |
} | |
# ACCESS PROFILES | |
foreach ($accessProfile in $accessProfiles) { | |
$InclusionTemplate = [pscustomobject][ordered]@{ | |
id = $accessProfile | |
type = "ACCESS_PROFILE" | |
} | |
$inclusionList += $InclusionTemplate | |
} | |
$e = $inclusionList | select-object -Property type | Where-Object {$_.type -eq "ENTITLEMENT"} | |
$a = $inclusionList | select-object -Property type | Where-Object {$_.type -eq "ACCESS_PROFILE"} | |
$r = $inclusionList | select-object -Property type | Where-Object {$_.type -eq "ROLE"} | |
write-host -ForegroundColor Blue "Campaign scope covers $($r.type.count) Role(s), $($e.type.count) Entitlement(s) and $($a.type.count) Access Profile(s)." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment