How to check who
created list view in SharePoint online document library/ list
You cannot get the information who a
view created because it's not cover by the object model. The object doesn't store a property for modified or
created. To get the information all you can do is to get the information from
the file. So for the view url you need to request the file
url****.aspx
.
The PowerShell Script looks like this:
# Load required dlls
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.DocumentManagement")
$SiteUrl = "https://Yourtenent.sharepoint.com/sites/sitename"
$viewurl =
"https://Yourtenent.sharepoint.com/sites/sitename/Shared%20Documents/Forms/Custom.aspx"
$sUserName="admin@Yourtenent.onmicrosoft.com"
$securePassword= ConvertTo-SecureString
"your password" -asplaintext -force
$credentials =
New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($sUserName, $securePassword)
$spoCtx =
New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
$spoCtx.Credentials =
$Credentials
$spoCtx.RequestTimeOut = 5000 * 60 * 10;
$web =
$spoCtx.Web
$site =
$spoCtx.Site
$spoCtx.Load($web.Webs)
$spoCtx.Load($site)
$spoCtx.ExecuteQuery()
Write-Host "connected
successfully"
$targetUrl =$web.GetFileByUrl("https://Yourtenent.sharepoint.com/sites/learninghub/Shared%20Documents/Forms/Custom.aspx")
$spoCtx.Load($targetUrl)
$spoCtx.Load($targetUrl.Author)
$spoCtx.ExecuteQuery()
Write-Host "View:
$($targetUrl.Name)"
Write-Host "Author
$($targetUrl.Author.UserPrincipalName)"
Write-Host "Created
On: $($targetUrl.TimeCreated)"
Sophisticated describe the information. The information is real true. I am happy to go through your page. Keep Writing…
ReplyDeleteGermany VPS Hosting
This comment has been removed by the author.
ReplyDeleteGood! article, You describe very well on "How to check who created list view in SharePoint Online document library/ list?" this is really true. I was searching for this kind of information. Our Onlive Server offers a wide range of operating systems of USA VPS Hosting plans that have better performance and reliability.
ReplyDeletethanks
ReplyDeleteImpressive, this is very important to know for all of us about this knowledge. It is very pleasure to get it as I got huge helps right here. If you want to know about server hosting or interested in best USA VPS hosting Join and grow your business I really love your blog and surely recommend to my friends. keep it u....!!! Thank you so much for sharing this and I wish you all the best for the upcoming article.