Forum Discussion

reshmeeauckloo's avatar
reshmeeauckloo
Brass Contributor
May 12, 2024

Issue with get-sposite SPO PowerShell

Issue with SPO PowerShell get-sposite for all sites not returning the correct values for different properties SharingDomainRestrictionMode , LimitedAccessFileType, DefaultSharingLinkType, DefaultLink...
  • reshmeeauckloo's avatar
    reshmeeauckloo
    May 13, 2024
    Unfortunately the MS case got closed as SPO PowerShell scripting was not supported by the support team.
    The only way to get the correct properties is to iterate through each site
    ```
    $sites = Get-SPOSite -Limit All | Select-Object -Property Url
    $siteArray = @();
    foreach($site in $sites)
    {
    $siteProp = Get-SPOSite -Identity $site.Url
    $siteArray+=$siteProp
    }
    $siteArray | Select-Object -Property *

Resources