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 to get who created a site from the SharePoint user interface! You can’t get “Created By” or “Created On” values anywhere. But PowerShell is our rescuer! Let’s see who has created a SharePoint site using PowerShell:
Find Out Who Created a SharePoint Site
Just run the below PowerShell script to find who has created a SharePoint site:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Get the Web $web = Get-SPWeb "https://portal.crescent.com/sites/Sales" #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 $SiteURL="https://Crescent.sharepoint.com/sites/marketing" #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 $Web=$Ctx.Web $Ctx.Load($Web) $Ctx.Load($Web.Author) $Ctx.ExecuteQuery() #Find who created a site $Web.Author | Select LoginName, Email, Title
You can also get the site created date and time as:
PnP PowerShell to Get the Creator of a Site
To find out who created a site in SharePoint Online, use this PnP PowerShell:
$SiteURL = "https://crescent.sharepoint.com/sites/HR" #Connect to Site Connect-PnPOnline $SiteURL -Interactive #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
One thought on “How to Find Who Created a Site in SharePoint?”
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
+ CategoryInfo : NotSpecified: (:) , MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest