Dismiss Notice

Register now to be one of the first members of this SharePoint Community! Click here it just takes seconds!

Dismiss Notice
Welcome Guest from Country Flag

Get-SPOSite Excruciatingly Slow

Discussion in 'SharePoint Blogs' started by /u/stele007, Aug 14, 2019.

Thread Status:
Not open for further replies.
  1. /u/stele007

    /u/stele007 Guest

    Blog Posts:
    0
    Hey, I've been an Exchange admin for several years, and I'm working on a migration to OneDrive... I'm trying to retrieve just an individual user's OneDrive URL quickly, but for some reason takes over a minute per query, and sometimes it even times out. Similar filtered queries in Azure AD or Exchange Online run hundreds of times faster. I've tried really specific filters, but it doesn't seem to help the performance. I haven't done much other work with SharePoint (I don't really like it).

    Here's what I'm running:
    PowerShell Import-Module Microsoft.Online.Sharepoint.PowerShell Connect-SPOService -url https://companytenant.sharepoint.com -Credential $credential $oneDriveURL = (Get-SPOSite -IncludePersonalSite $true -Filter "Owner -eq $($line.UserPrincipalName) -and Url -like '-my.sharepoint.com'").Url

    Even if I explicitly define the full URL I'm retrieving in the filter, it still takes forever, as you can see below. It's like the filter is only applying after it retrieves every other site. Does anyone else get poor performance when retrieving SPO Sites? I verified our firewall isn't blocking any traffic.

    ```PowerShell PS C:\Scripts> Measure-Command { Get-SPOSite -IncludePersonalSite $true -Filter "URL -eq 'https://companytenant.sharepoint.com/personal/user_name_company_com'" }

    Days : 0 Hours : 0 Minutes : 1 Seconds : 22 Milliseconds : 277 Ticks : 822770931 TotalDays : 0.000952281170138889 TotalHours : 0.0228547480833333 TotalMinutes : 1.371284885 TotalSeconds : 82.2770931 TotalMilliseconds : 82277.0931 ```

    submitted by /u/stele007
    [link] [comments]

    Continue reading...
     
Thread Status:
Not open for further replies.

Share This Page

LiveZilla Live Chat Software