kwizcom banner advertisement

Find Who has Created / Modified a SharePoint View

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
Find Who has Created / Modified a SharePoint View Find Who has Created / Modified a SharePoint View Reviewed by Salaudeen Rajack on 3:40 PM Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.