30-second answer
Get-PnPTenantSite -Identity https://contoso.sharepoint.com/sites/oldproject |
Select-Object Url, LockState, ArchiveStatusLockState is Unlock, ReadOnly or NoAccess. ArchiveStatus is
NotArchived or one of Microsoft 365 Archive's states, which SharePoint
Online PowerShell names RecentlyArchived for the seven days after a site is
archived, then FullyArchived, and Reactivating on the way back.
What this proves
Whether the site is in a state where content changes are possible. A locked or archived site cannot be changed by its users, whatever their permissions say.
What it does not prove
- Why it was locked or archived. The state records the decision, not the reason: legal hold, decommissioning, cost management and abandoned cleanup all look the same here.
- That the content is gone. Archived and read-only content still exists, still appears where policies let it, and still has to be counted in migrations and audits.
- That no file is archived. Site-level and file-level archive states are
independent, and file-level archiving is on by default once Microsoft 365
Archive is enabled: a site reading
NotArchivedcan still hold archived files.ArchivedFileDiskUsedonGet-SPOSitegives the storage they use.
PowerShell
Get-PnPTenantSite |
Where-Object { $_.LockState -ne 'Unlock' -or $_.ArchiveStatus -ne 'NotArchived' } |
Select-Object Url, LockState, ArchiveStatusExample output
Url LockState ArchiveStatus
--- --------- -------------
https://contoso.sharepoint.com/sites/legacy ReadOnly NotArchived
https://contoso.sharepoint.com/sites/2019bid Unlock FullyArchivedIllustrative: the archive values are SharePoint Online's own, as listed above.
Explanation
These two properties change what every activity metric means. A site nobody has edited in two years reads as abandoned, unless it is read-only, in which case nobody could have edited it: the inactivity is the consequence of a decision, not a signal of neglect. Any staleness report that does not first exclude undecidable sites files deliberate archives next to genuine abandonment, and both readings suffer for it.
Production considerations
- Both properties come from the tenant record; the admin-centre connection and a SharePoint administrator role are required.
NoAccesssites refuse even reads. Expect collection to fail on them, and record the refusal as its own fact rather than as an empty site.
Related governance rules
SPO-ACTIVITY-001: applicability excludes sites nobody could change
References
- Lock and unlock sites (Microsoft Learn)
- Microsoft 365 Archive (Microsoft Learn)
- Manage Microsoft 365 Archive (Microsoft Learn, file-level archive, read 7 November 2026)
- Get-SPOSite and Set-SPOSiteArchiveState (Microsoft Learn, archive states, read 7 November 2026)
Found something wrong? Suggest a correction. The article source is not public; the engine it cites is.
What this answer underwrites
The engine reads these Microsoft operations to collect evidence, so what is established here is what those collectors rest on.