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?
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?
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();
}