Hide Libraries From File Explore

Sometimes your users don’t need to see every single SharePoint library when they’re in file explorer. Here is a bit of PowerShell that will hide necessary libraries from file explorer. Make sure you change the URL to your SharePoint site’s URL and the folder name to the library you want to hide.

#folder can be site, library level and folder level
$folder = (Get-SPWeb http://sp2013/sites/company).Folders["Documents"]

#use this to hide subfolders
#$folder = (Get-SPWeb http://sp2013/sites/company).Folders["Documents"].SubFolders["MyDocs"]

#hide folder

#show folder