Last active
November 15, 2018 20:34
Revisions
-
darrenjrobinson revised this gist
Nov 15, 2018 . No changes.There are no files selected for viewing
-
darrenjrobinson created this gist
Nov 13, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ $roles = @() $entitlements = @() $accessProfiles = @() foreach ($identity in $Accounts) { write-host "" Write-host "Details for $($identity.name)" write-host " $($identity.source.name) : $($identity.displayName)" foreach ($source in $identity.access) { if ($source.type.Equals("ROLE")) { $roles += $source.id write-host -ForegroundColor Yellow " Source: $($source.displayName) Access Type: $($source.type)" } if ($source.type.Equals("ENTITLEMENT")) { $entitlements += $source.id write-host -ForegroundColor Yellow " Source: $($source.displayName) Access Type: $($source.type)" } if ($source.type.Equals("ACCESS_PROFILE")) { $accessProfiles += $source.id write-host -ForegroundColor Yellow " Source: $($source.displayName) Access Type: $($source.type)" } } } $roles = $roles | Select-Object -Unique $entitlements = $entitlements | Select-Object -Unique $accessProfiles = $accessProfiles | Select-Object -Unique