web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PS Script - Get all Sh...
Power Apps
Unanswered

PS Script - Get all SharePoint sites associated with DataVerse

(1) ShareShare
ReportReport
Posted on by 2

Hi,

 

I've been asked to write a PowerShell script to get all SharePoint site URLs which are associated with DataVerse. Any suggestions how to go about that?

 

Thanks,

Zain

I have the same question (0)
  • Kristian_Cole Profile Picture
    195 on at

    So you can get a range of site information via powershell regarding sharepoint:

     

    Get-SPOSiteGroup (Microsoft.Online.SharePoint.PowerShell) | Microsoft Learn

     

    But its looks limited to dataverse connections.

     

    I found this script:

    Add-PSSnapin Microsoft.SharePoint.PowerShell -EA 0
     
    Start-SPAssignment –Global
    $spSites = Get-SPSite -Limit All
    $spWAs = Get-SPWebApplication -IncludeCentralAdministration
    $csvs = @()
    
    #Get Web Application Data
    Write-Host("Getting Web Application Data")
    $spWAs | select Name, DisplayName, Id, Url, ApplicationPool, @{Expression={$_.ApplicationPool.Name}}, @{Expression={$_.ApplicationPool.UserName}}, DefaultQuotaTemplate | Export-CSV $bkdir\SPWebApplication.csv
    $csvs += C:\SPWebApplication.csv
    
    #Get Site Collection Data
    Write-Host("Getting Site Collection Data")
    $spSites | select Id, HostName, Url, Owner,WebApplication, ContentDatabase, RootWeb, LastContentModifiedDate, @{Expression={$_.Usage.Storage}} | Export-CSV $bkdir\SPSite.csv
    $csvs += C:\SPSite.csv
     
    #Get Site Data
    Write-Host("Getting Site Data")
    $spSites | Get-SPWeb -Limit All | select ID, Title, Author, Url, WebTemplate, LastItemModifiedDate, IsRootWeb | Export-CSV $bkdir\SPWeb.csv
    $csvs += C:\SPWeb.csv
    Stop-SPAssignment –Global

     

    The #getsitedata section may help if you have a field that mirrors a dataverse field.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard