Fetchig the all unlocked sites from SHarePoint server

sns 9,231 Reputation points

Please share me the script to get the list of all site collections which are not in read mode and locked mode ( meaning all unlocked sites) and exporting to CSV from particular web applicaiton, it is sharepoinnt 2013

Thank you

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,894 questions
{count} votes

Accepted answer
  1. Renjie Sun-MSFT 2,856 Reputation points Microsoft Employee

    Hi @sns ,

    You could refer this PowerShell command template:

    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue  
    Get-SPWebApplication $WebAppURL | Get-SPSite -Limit All | ForEach-Object {  
    if ($_.ReadOnly -eq $false -and $_.ReadLocked -eq $false -and $_.WriteLocked -eq $false){  
        New-Object -TypeName PSObject -Property @{  
                 SiteName = $_.RootWeb.Title  
                 Url = $_.Url}}  
    } | Export-CSV $CSVFile -NoTypeInformation  

    Should you have any questions or concerns, please do feel free to contact me.

    Yours faithfully,
    Renjie Sun

    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.

0 additional answers

Sort by: Most helpful