2

How to remove the Shared Documents folder in SharePoint 2013 My Sites? I have to remove or hide the shared folder using powershell method.

Any powershell commands to delete the sharepoint 2013 mysite shared folder?

  • are you using sharepoint online or on prem? this is for one mysite or many my sites – Waqas Sarwar MVP Aug 22 '14 at 6:36
  • On prem and its for all my sites.... – geeky Aug 22 '14 at 6:43
2

As a workaround, you could create an empty SharePoint group, and set the permission on the folders toi that group only. It won't be shown to regular users, but owners and administrators would still see tyem. If this solves your problem, take a look at permission settings on items and folders using PowerShell:

$folders = $list.Folders

foreach ($spFolder in $folders)
{   
    $PermissionLevel = "PermissionName" ;
    $group = $web.SiteGroups[$GroupName];   
    $spFolder.BreakRoleInheritance($false);
    $roleAssignment = New-Object microsoft.sharepoint.SPRoleAssignment($group);
    $roleDefinition = $web.RoleDefinitions[$PermissionLevel];
    $roleAssignment.RoleDefinitionBindings.Add($roleDefinition);   
    $spFolder.RoleAssignments.Add($roleAssignment);       
    $spFolder.Update();   
}

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.