powershell - SharePoint CSOM Copy - RoleAssignment -
hope can me out. i'm working on powershell script performing serveral modifications on sharepoint environment.
i want copy roleassignments on web other in same site collection. basicly works when run commands manual in console doesent work while running script.
what this.
$roleassignmentmember = $roomwebroleassignment.member $rolebindings = $roomwebroleassignment.roledefinitionbindings $ctx.load($roleassignmentmember) $ctx.load($rolebindings) $ctx.executequery() $web.roleassignments.add($roleassignmentmember, $rolebindings) $ctx.executequery()
running $web.roleassignments.add($roleassignmentmember, $rolebindings) in console works.. not in script .. got error collection not ready .. acutally is^^..
any ideas ? hope can greetz
sorry, silly me.
for people interested:
# load $ctx.load($web.roleassignments.add($roleassignmentmember, $rolebindings)); $ctx.executequery();
Comments
Post a Comment