Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

Find Who has Created / Modified a SharePoint View

$
0
0
Every wondered how to find the user who has created/modified a particular SharePoint view? and when it was created/modified? Well, There is no SharePoint UI to get these information! But using SharePoint object model, we can retrieve these data programmatically from SPFile object's properties.

Here is how I retrieved "Created By", "Created On", "Modified By", "Modified On" values using PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Set these two variables accordingly
$WebURL = "http://sharepoint.crescent.com/"
$ViewURL = "http://sharepoint.crescent.com/LegalDoc/AuthorView.aspx"

#Get the Web
$web = Get-SPWeb $WebURL

#Get the View File
$ViewFile = $web.GetFile($viewURL)

Write-Host "Created By: " $ViewFile.Author
Write-Host "Created on: " $ViewFile.TimeCreated
Write-Host "Modified By: " $ViewFile.ModifiedBy
Write-Host "Modified On: " $ViewFile.TimeLastModified

Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>