HOWTO: Hide User Information from Lists

This Powershell script is courtesy of my expert colleague without who I would be lost (thanks Pradeep!). This script causes list views to display “***” instead of a users name in the Created By and Modified By columns when viewing list contents.

$url = "[your site url]"
$siteCollection = new-object Microsoft.SharePoint.SPSite $url
$site = $siteCollection.OpenWeb();
$lib = $site.Lists["[your list]"];
$lib.ShowUser = $false;
$lib.Update();
$site.Dispose();
$siteCollection.Dispose();

Change .ShowUser to $true to enable user information to show again. This script does not require an IISReset to be executed.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s


%d bloggers like this: