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
$folder.Properties["vti_winfileattribs"]="00000016"

#show folder
#$folder.Properties["vti_winfileattribs"]=""

$folder.Update()
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s