powershell script that retrieves who created sites on sharepoint

Kevin Howard Jr 21 Reputation points
2022-06-13T21:12:00.883+00:00

I'm trying to use PowerShell to find out who created sites on our SharePoint. What script do I need to enter to do that?

SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,363 questions
{count} votes

Accepted answer
  1. Jinwei Li-MSFT 4,691 Reputation points Microsoft Employee
    2022-06-20T08:19:34.71+00:00

    Hi @Kevin Howard Jr ,

    Please try to use this:

    $AdminCenterURL = "https://Contoso-admin.sharepoint.com/"  
      
    #Connect to SharePoint Online  
    Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential)  
      
    #Get Site owners of all site collections  
    Get-SPOSite -limit ALL | Select URL, Owner  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


3 additional answers

Sort by: Most helpful
  1. Nick Von Ogden 26 Reputation points
    2022-06-14T05:56:02.46+00:00

    This should work for you - though you might need to be a site collection admin to run these commands and also may need to allow the PNP Powershell module in your environment. First two commands install the PNP module and import it. Replace the $URL variable with the site URL in question

    Install-Module -Name PnP.PowerShell -Scope CurrentUser  
    Import-Module PNP.Powershell  
    $URL = 'SiteURLHere'  
    Connect-PnPOnline -Url $url -Interactive  
    Get-PnPProperty -ClientObject (Get-PNPWeb) -Property Author  
    

    Please don’t forget to Accept the answer if this works for you.

    No comments

  2. Jinwei Li-MSFT 4,691 Reputation points Microsoft Employee
    2022-06-22T09:32:07.38+00:00

    Hi @Kevin Howard Jr ,

    This issue cannot be reproduced from my end. Here is the test of my screenshot. Plesae check out.
    213760-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Jinwei Li-MSFT 4,691 Reputation points Microsoft Employee
    2022-06-24T07:26:01.65+00:00

    Hi @Kevin Howard Jr ,

    Please try to use PNP to connect:
    Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/test123

    Reference: Connect-SPOService