2

For reference please see the script running for updating the category with specific groups and granting read permission:-

$groupI  = (Get-TridionGroup -GroupName "Group I").Id
$groupIRead = @{}
$groupIRead.Add($groupI, "Read")
Update-TridionCategory -WebdavUrl "webdav/C010 Dummy Schemas/Dummy" -Permissions $groupIRead -Verbose 


$groupII = (Get-TridionGroup -GroupName "Group II").Id
$groupIIRead = @{}
$groupIIRead.Add($groupII, "Read")
Update-TridionCategory -WebdavUrl "webdav/C010 Dummy Schemas/Dummy" -Permissions  $groupIIRead -Verbose 

After running the above script category is updating with only GroupII whichever group is executed at the last only with that group category is getting updated.

  • It looks like you are using Peter Kjaer's Tridion powershell module for Get-TridionGroup. Or perhaps this is your own function. Have you written Update-TridionCategory yourself? Please add the necessary information to your question. – Dominic Cronin Aug 10 '16 at 8:59
  • You might find this blog post interesting. blog.indivirtual.nl/… – Dominic Cronin Aug 10 '16 at 9:03
1

I think you're overwriting your permissions. use one update statement. add both groups to your hashtable. not tested, but I think this will work:

$groupI  = (Get-TridionGroup -GroupName "Group I").Id
$groupRead = @{}
$groupRead.Add($groupI, "Read")

$groupII = (Get-TridionGroup -GroupName "Group II").Id
$groupRead.Add($groupII, "Read")
Update-TridionCategory -WebdavUrl "webdav/C010 Dummy Schemas/Dummy" -Permissions  $groupRead -Verbose 
| improve this answer | |
  • I don't have the update-tridioncategory method. can you post the source for that? – Warner Soditus May 13 '16 at 12:31
  • One more thing I missed out to mention whatever scripts you told to try first group is updating the category for 2nd group facing error preparing to add: tcm:0-000-40000 with permission:Read Added tcm:0-000-40000-to ACL preparing to add:tcm:0-001-40002 with permission:Read Update-TridionCategory:Method invocation failed because[Tridion.ContentManager.CoreService.Client.AccessControlEntryData] doesn't contain a method named 'op_Addition'.At line:1 char:2+ Update-TridionCategory -WebdavUrl "webdav/DummySchemas/Dummy CategoryInfo :InvalidOperation:(op_Addition:String)[Update-TridionCategory] – k951 May 13 '16 at 13:10
  • I'm asking for the powershell source code for update-tridioncategory. I don't have that in my code base. it look like need a different approach for adding multiple groups. – Warner Soditus May 13 '16 at 14:35
  • It does indeed look like you are overwriting the permissions, but it's impossible to tell without seeing Update-TridionCategory. – Peter Kjaer Jun 13 '16 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.