How to Find Who Created a Site in SharePoint?

Ever wanted to find out who has created a SharePoint site? Sorry! There is no way from SharePoint user Interface to get who created a site! You can't get "Created By" or "Created On" values anywhere. But PowerShell is our rescuer! Lets see who has created a SharePoint site using PowerShell:
Find Who Created a Site in SharePoint Online using PowerShell

Find Out Who Created a SharePoint Site
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

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

#Get Site Creator and Created Date 
write-host "Site Created by:"$web.Author
Write-host "Created on:" $web.Created 
This PowerShell gets you who created a site collection or subsite.

SharePoint Online: PowerShell to Get Who Created Site 
Similarly, to find who created a site in SharePoint Online, use this PowerShell script:
#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

#Set Parameters

#Setup Credentials to connect
$Cred= Get-Credential
$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
#Setup the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = $Credentials
#Get the web

#Find who created a site
$Web.Author | Select LoginName, Email, Title

You can also get site created date and time as:

PnP PowerShell to Get the Creator of a Site
$SiteURL = ""

#Connect to Site
Connect-PnPOnline $SiteURL -UseWebLogin

#Get the Web
$Web = Get-PnPWeb

#Get the author - who has created the site
Get-PnPProperty -ClientObject $Web -Property Author
Related post: Determine who created a list view in SharePoint

1 comment:

  1. Hello, I tried the code for sharepoint online, but get error message below.

    Cannot find an overload for "Load" and the argument count: "1".
    At line:19 char:1
    + $Ctx.Load($Web.Author)
    + ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest


Please Login and comment to get your questions answered!

Powered by Blogger.