Objective:
This exercise is intended to explore the Tridion Core Service Powershell Module and retrieve various access rights users have on each publication.
The execution of this powershell script can show the access rights in a matrix on screen and also write down to a csv on file system
Getting Ready:
Refer this blog to Setup and Starting with Tridion Core Service powershell module and execute below powershell script:
$publications = Get-TridionPublications -ExpandProperties $acls = @(); foreach($p in $publications) { $groupNames = foreach ($g in $p.AccessControlList.AccessControlEntries) { $rightsInfo = New-Object psobject $rightsInfo | Add-Member -MemberType NoteProperty -Name "GroupName" -Value $g.Trustee.Title $rightsInfo | Add-Member -MemberType NoteProperty -Name "ACL" -Value $g.AllowedRights $rightsInfo } $entry = New-Object psObject $entry | Add-Member -MemberType NoteProperty -Name "PubName" -Value $p.Title $entry | Add-Member -MemberType NoteProperty -Name "Groups" -Value $groupNames Write-Output $entry $acls += $entry } $acls | Select-Object PubName, Groups -ExpandProperty Groups | Select-Object PubName, GroupName, ACL | ogv
You can get more details about the logic on Peter Kjaer’s GitHub
The below screen capture shows this in action:
Leave a Reply