Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
are you using sharepoint online or on prem? this is for one mysite or many my sites –  Waqas Sarwar MCSE Aug 22 at 6:36
    
On prem and its for all my sites.... –  geeky Aug 22 at 6:43

1 Answer 1

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();   
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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