Skip to content
All articlesArchiving

SharePoint Inactive Files Policy: New-SPOFileArchivePolicy Guide

Microsoft's SharePoint inactive files policy (file archive policy cmdlets): preview and GA dates, last-access rules, What-If mode, limits and licensing.

19 Oct 2026Updated27 Oct 202618 min read
SharePoint Inactive Files Policy: New-SPOFileArchivePolicy Guide

SharePoint inactive files policy: how it works

Microsoft's inactive files policy in SharePoint Advanced Management archives files automatically once nobody has accessed them for a set number of months. You create it with the New-SPOFileArchivePolicy PowerShell cmdlet, test it in What-If mode, and switch it on with Set-SPOFileArchivePolicy -State Active. Microsoft's cmdlet pages call the feature file archive policies, and its Microsoft 365 Archive pages call it the inactive files policy. They are the same feature.

This page walks through the cmdlets in the order you would use them, what each rule means, the limits Microsoft publishes, what happens to a file after the policy archives it, and licensing. Everything here comes from Microsoft Learn's cmdlet reference, its manage-inactive-files page and its Microsoft 365 Archive pages.

Availability

Microsoft's management page states that public preview is planned for October 2026 and general availability is planned by the end of 2026, and that these dates are targets that may change. Microsoft 365 roadmap item 573699, "SharePoint: Advanced Management - Inactive files policy", lists the feature as in development, with preview in October 2026 and general availability in December 2026. The roadmap item names Microsoft 365 Archive and pay-as-you-go billing as prerequisites.

During the preview the policy is managed only through PowerShell. Microsoft says support through the SharePoint Admin Agent is planned before general availability.

Before you deploy a policy, Microsoft's page asks you to confirm that:

  • the public preview is available for your tenant,
  • your tenant has the required SharePoint Advanced Management entitlement,
  • your administrator account is a SharePoint Administrator or Global Administrator,
  • you are using Microsoft.Online.SharePoint.PowerShell version 16.0.27709.12000 or later, and
  • your tenant meets the Microsoft 365 Archive service and billing prerequisites.

The cmdlets

CmdletWhat it does
New-SPOFileArchivePolicyCreates a policy. It is created inactive.
Set-SPOFileArchivePolicyUpdates a policy and activates or deactivates it with -State.
Add-SPOSiteToFileArchivePolicyAdds a site to a policy, as an inclusion or (with -Exclude) an exclusion.
Get-SPOFileArchivePolicyReportReturns the run reports for a policy.

Microsoft also documents Get-SPOFileArchivePolicy, Get-SPOFileArchivePolicySites, Remove-SPOFileArchivePolicy and Remove-SPOSiteToFileArchivePolicy.

Step 1: create the policy

-PolicyType is the only required parameter, and it sets the scope. Microsoft's management page lists two scope types for SharePoint sites:

PolicyTypeApplies to
SelectedSitesOnly the SharePoint sites you add to the policy
AllSitesAll eligible SharePoint sites, except sites you exclude

The cmdlet reference also lists an AllODBSites type for OneDrive for Business sites. Microsoft's management page states that OneDrive sites are not supported in this preview and that its workflow covers SharePoint sites, so use SharePoint sites for a pilot.

New-SPOFileArchivePolicy -PolicyType "AllSites" -Name "ArchiveAll"

That example uses the default rule: archive files not accessed in the last 24 months. To change it, pass -LastAccessDateCriteria, which accepts 6 to 48 months:

New-SPOFileArchivePolicy -PolicyType "SelectedSites" -Name "ArchiveMarketing" -LastAccessDateCriteria 12

-FileTypeCriteria limits the policy to listed extensions, and -FileTypeExclusionCriteria exempts listed extensions. Both take dot-prefixed values such as .docx. If you omit them, all file types are included. Microsoft's example creates a simulation policy that considers only Word documents and PDFs:

New-SPOFileArchivePolicy -Name "FilteredFilesPreview" -PolicyType "SelectedSites" -FileTypeCriteria @(".docx", ".pdf") -IsWhatIfMode $true

Built-in exclusions still apply regardless of the filters. Microsoft's examples use 12 months to illustrate configuration, and it states that value is not a universal deployment recommendation.

How the last access date works

The policy uses the last access date, which Microsoft defines as the recorded date a human last accessed a file. AI agent, application, script and system access do not update it. A file can qualify for archiving when its recorded date is earlier than the policy's inactivity cutoff, and other eligibility rules still apply.

Choose the number with July 2025 in mind. The cmdlet reference states: "The last access date is accurate starting July 2025. Dates before that may be missing access signals from some clients. For critical data, ensure your criteria doesn't archive based on last access dates before July 2025." Microsoft's management page adds that July 2025 is a data-quality boundary, not an archiving restriction: older last access dates still exist, and policies use them. Human access before July 2025 might not have been captured, so a recorded date can make a file look inactive for longer than it really was.

Microsoft's example: a file has a recorded date in 2022 and an unrecorded human access in 2024. With a policy cutoff in 2023, the file can qualify for archiving, because the policy uses 2022. For critical content, Microsoft suggests an inactivity period that falls entirely after July 2025, and reviewing the simulation results with site owners.

Step 2: add or exclude sites

Inclusion and exclusion work in opposite directions, and using the wrong one returns an error:

  • For a SelectedSites policy, add sites as inclusions. At least one site must be added before the policy can be activated.
  • For an AllSites policy, add sites with -Exclude to exempt them.
  • A single policy can have at most 1,000 associated sites. For SelectedSites they are inclusions, and for AllSites they are exclusions.
Add-SPOSiteToFileArchivePolicy -PolicyId "<policy GUID>" -Site "https://contoso.sharepoint.com/sites/marketing"
Add-SPOSiteToFileArchivePolicy -PolicyId "<policy GUID>" -Site "https://contoso.sharepoint.com/sites/legal" -Exclude

The second line only works on an AllSites policy. The site must exist and be eligible for archiving. An exclusion affects future processing by that policy. It does not reactivate files that are already archived, reverse earlier policy actions, or exempt the site from another archive policy or from manual archiving.

Step 3: test in What-If mode

Create the policy with -IsWhatIfMode $true, or turn it on later with Set-SPOFileArchivePolicy -PolicyId <GUID> -IsWhatIfMode $true. Microsoft describes the behavior: the policy "will evaluate which files meet the archiving criteria and report the results, but will not actually archive any files."

A policy's state and its simulation setting are separate:

StateIsWhatIfModeBehavior
Inactive$trueSimulation is configured, but the policy is not active
Active$trueEvaluates and reports without archiving files
Inactive$falseEnforcement is configured, but the policy is not active
Active$falseArchives files that qualify when the policy processes them

Read the results with:

Get-SPOFileArchivePolicyReport -PolicyId "<policy GUID>"

The report command returns run history for the preceding 12 months and shows, for each run, how many sites were processed, how many files were archived and the total storage archived. For a What-If policy it shows how many files and how much storage would have been archived. Microsoft describes simulation results as estimates, not a guarantee of what will eventually be archived, and suggests starting with a limited pilot and agreeing with site owners how results are reviewed before enabling enforcement.

Step 4: activate

Set-SPOFileArchivePolicy -PolicyId "<policy GUID>" -State Active

You cannot activate a SelectedSites policy until at least one site has been added to it. To turn What-If off at the same time, set -IsWhatIfMode $false; Microsoft notes that when it is false the policy "archives files normally when active."

Set-SPOFileArchivePolicy only changes the parameters you pass. Name, criteria, type and What-If mode can all be changed later, with -PolicyId as the only required parameter. Activation allows the policy to process. It does not guarantee immediate completion or an immediately available report, and processing might span multiple runs depending on scope, file volume, service load and eligibility.

Limits and scale

Microsoft publishes these figures for the preview:

MeasureValueType
Sites scanned per policy100,000 sitesHard limit
Files archived per day1 to 2 million files at current scaleThroughput guidance
Site associations per policy1,000 sitesHard limit

Running several AllSites policies at the same time slows overall processing, because they compete for resources. If a policy covers more than 100,000 sites, Microsoft says to create a new policy with the same criteria, scope and inclusions or exclusions when you are ready to archive, with IsWhatIfMode set to $false. Switching an existing simulation policy to archiving resumes from its previous processing position, so sites already evaluated in simulation might be skipped.

What happens to a file the policy archives

The policy uses the same archive tier as manual file-level archive in Microsoft 365 Archive, so the same behavior applies:

  • The file stays in SharePoint, in the archive tier. Anyone with read access can reactivate it, and Microsoft states there is no fee. Reactivation is instantaneous while the file is recently archived, which lasts seven days, and can take up to 24 hours after that, per Microsoft's archive states.
  • A 120-day wait follows reactivation. Microsoft's management page says a reactivated file cannot be archived "manually or by policy" for 120 days. After that, a policy can archive it again the next time the policy evaluates it, if it still meets the criteria.
  • Copilot does not use archived content. Microsoft's FAQ states: "No, archived content isn't used by Microsoft Copilot."
  • Site storage figures. Microsoft's manage-inactive-files page states that file archiving changes tenant storage accounting, not the site's quota usage, so the site's storage figure does not decrease. At tenant level the bytes are reclassified from active to archived storage.
  • Billing. Archived storage is charged only when archived plus active storage exceeds the tenant's included allocation, at $0.05 per GB per month, against $0.20 for standard storage, per Microsoft's pricing page.

Controls, audit and stopping a policy

Manual archiving and policy archiving are separate controls. Setting Set-SPOTenant -AllowFileArchive $false removes the manual Archive action for users, but Microsoft states that "admin-defined policies can still archive eligible files automatically," so this setting does not stop a policy.

To see what a policy did, use the policy reports and search the audit log for the FileArchived event. For policy archiving it includes the policy ID, the policy version and the file's last access date.

To stop a policy, make it inactive: Set-SPOFileArchivePolicy -PolicyId $policyId -State Inactive. To remove a site association, use Remove-SPOSiteToFileArchivePolicy; you cannot remove the final included site from an active SelectedSites policy, so make the policy inactive first or add another included site. To remove a policy, preview it with Remove-SPOFileArchivePolicy -PolicyId $policyId -WhatIf, then run it without -WhatIf. Removing a policy soft-deletes it. It does not delete or reactivate the files the policy archived, and accessing archived files still requires reactivation. The -WhatIf switch previews the removal command and is different from the policy's persistent IsWhatIfMode setting.

If results look unexpected

If you noticeTry this
The policy has not started processingCheck that it is active and includes the sites you expect, and confirm preview availability, your SharePoint Advanced Management entitlement and the Archive prerequisites
The policy runs but no files are archivedCheck IsWhatIfMode first. If it is $true, the policy only reports. Otherwise review the threshold, file type filters and the report's outcome reasons
A file you expected to stay active qualifiesCompare its last human access date with the threshold. AI agent and system access do not update it, and a recorded date before July 2025 can make a file look inactive for longer than it was
Archive results differ from the simulationCompare the settings and sites processed in each run. Files might have been accessed or become ineligible since the simulation
Files on an excluded site are still archivedConfirm the exclusion is on the correct AllSites policy, and check whether another policy or a user archived them, or whether they were archived before the exclusion was added
The site's storage usage has not gone downFile archiving changes tenant storage accounting, not the site's quota usage

Licensing and cost

It is not an E3 or E5 feature by itself. Microsoft's Archive overview calls these "SharePoint Advanced Management (SAM) automatic file archive policies", so SAM licensing applies. Per Microsoft's SAM prerequisites page, you need:

  1. A base subscription: Office 365 E3, E5 or A5; Microsoft 365 E1, E3, E5 or A5; or the Microsoft 365 GCC, GCC-High or DoD equivalents.
  2. A SAM entitlement, which is any one of: at least one user in the tenant assigned a Microsoft Copilot license (the user does not need to be an administrator); the SharePoint Advanced Management Plan 1 add-on, for subscriptions that include SharePoint K, P1 or P2; or Microsoft 365 E7.
  3. Microsoft 365 Archive with pay-as-you-go billing, because archived files land in the archive tier. That means an Azure subscription and resource group, with archive storage billed at $0.05 per GB per month once archived plus active storage exceeds the tenant's included allocation.

Microsoft's list of SAM features included with a Copilot license names the inactive sites policy, the site ownership and attestation policies, catalog management and change history, among others. It does not name the inactive files policy, and only restricted site creation is explicitly called out as needing the Plan 1 add-on. Microsoft's roadmap item for the policy carries no licensing statement, and the documentation does not publish a SAM add-on price. Confirm the policy specifically with Microsoft or your partner before you plan around it. For the wider SAM picture, see SharePoint Advanced Management licensing.

File types the policy cannot archive

Microsoft's Archive overview lists extensions that SAM automatic file archive policies cannot archive: .js, .css, .one, .onepkg, .onepart, .onetoc2, .onetmp, .spcolor, .sptheme, .spfont, .eot, .onebin, .woff, .woff2, .xsl, .json, .classifier, .aspx, .onetoc, .onebak and .onebackupconstruction. Microsoft states: "These exclusions apply regardless of the file type filters configured for the policy."

OneDrive

Microsoft's management page covers SharePoint sites and states that OneDrive sites are not supported in the preview. Its Archive overview says file-level archive is available only for SharePoint sites, and the cmdlet reference lists an AllODBSites type. For the options that exist for OneDrive today, see OneDrive archiving.

Where Squirrel differs

Squirrel archives inactive files from SharePoint document libraries on rule-based policies. These are the differences that matter most when you weigh it against Microsoft's policy.

Restore without the wait. A file Microsoft's policy archives can be reactivated instantly for its first seven days. After that, Microsoft's archive states say reactivation can take up to 24 hours, and the file then cannot be archived again for 120 days. With Squirrel the file stays in place as a stub. A user clicks it and the file is back within seconds, however long it has been archived, with no fee and no re-archive block.

Granular rules. Microsoft's policy has one set of criteria per policy: last access age, file type, and the sites it covers. Squirrel's rules go down to the library, the folder and the file:

FilterMicrosoft's inactive files policy (preview)Squirrel
Last accessed6 to 48 months of last human access, default 24Days, optional
Last modifiedNot a policy parameterDays, default 730
File typeInclude and exclude listsAllow and deny lists per site, plus a tenant-wide exclude list
File sizeNot a policy parameterMinimum size, tenant-wide or per site
Folder or libraryScope is by siteExclude libraries and folders, with wildcard folder patterns
Filename patternNot a policy parameterSubstring match on the full path
Sensitivity labelsNot a policy parameterSkips files carrying chosen Microsoft Purview Information Protection labels
Per-site rulesCriteria are set per policy, and sites are included or excludedA custom policy for each site that overrides the tenant defaults
Test before enablingWhat-If mode and run reportsPreview, which counts and changes nothing

Squirrel's filters come from its administration guides. Microsoft's come from its cmdlet reference and management page, and may change before general availability.

The rest:

  • Where the bytes go. Microsoft's policy keeps files in its archive tier inside SharePoint. Squirrel moves them into an Azure Blob Storage account in your own subscription and leaves a stub with the original name and metadata.
  • Copilot. Microsoft's archived files are not used by Copilot. Squirrel's stub summaries keep archived content discoverable.
  • Scope. Squirrel archives document library files across the sites you include, with a custom policy for each site. Microsoft's policy covers SharePoint sites in the preview.
  • Availability. Squirrel is available now. Microsoft's policy is in preview, with general availability planned by the end of 2026.

See how Squirrel archives inactive SharePoint files

Frequently asked questions

What is the SharePoint inactive files policy?

It is a SharePoint Advanced Management policy that archives files automatically based on their last access date, into Microsoft 365 Archive. Microsoft's cmdlets call it a file archive policy and its management page calls it the inactive files policy.

Which cmdlet creates it?

New-SPOFileArchivePolicy. The policy is created inactive and must be activated with Set-SPOFileArchivePolicy -State Active.

What are the rules?

Months since last access, from 6 to 48 with a default of 24, plus optional file-type include and exclude lists, applied to selected SharePoint sites or to all eligible SharePoint sites except those you exclude.

Is it generally available?

Not yet. Microsoft's management page says public preview is planned for October 2026 and general availability by the end of 2026, as targets that may change. The Microsoft 365 roadmap lists preview in October 2026 and general availability in December 2026.

Does it work on OneDrive?

Microsoft's management page states that OneDrive sites are not supported in the preview, and its Archive overview says file-level archive is available only for SharePoint sites.

How many sites can a policy cover?

A policy scans up to 100,000 sites and can have up to 1,000 associated sites, as inclusions or exclusions. Microsoft gives 1 to 2 million files archived per day as throughput guidance.

What is the last access date?

The recorded date a human last accessed a file. AI agent, application, script and system access do not update it. Dates before July 2025 may be missing access signals from some clients, but policies still use them.

How do I test it without archiving anything?

Use What-If mode with -IsWhatIfMode $true, then read the run reports with Get-SPOFileArchivePolicyReport. Reports show how many files and how much storage would have been archived.

Can users stop the policy by turning off the Archive button?

No. Setting -AllowFileArchive $false on the tenant blocks manual archiving, but Microsoft states that admin-defined policies can still archive eligible files.

Can a user get an archived file back?

Yes. Anyone with read access can reactivate it, and there is no fee. Reactivation is instant for the first seven days after archiving and can take up to 24 hours after that. After reactivation the file cannot be archived again, manually or by policy, for 120 days.

Does it reduce my SharePoint storage figure?

Microsoft states that file archiving changes tenant storage accounting, not the site's quota usage, so the site's storage figure does not decrease. At tenant level the bytes move from active to archived storage.

Do I need E3 or E5 to use it?

E3 and E5 are among the qualifying base subscriptions, and so are Microsoft 365 E1 and A5, but the policy is a SharePoint Advanced Management feature. You also need a SAM entitlement: a Copilot license assigned to any user, the Plan 1 add-on, or Microsoft 365 E7.

Is there an extra licensing cost?

Possibly. Microsoft's list of SAM features included with a Copilot license does not name the inactive files policy, so a Copilot license alone may not cover it and the Plan 1 add-on may be needed. Microsoft does not publish an add-on price in its documentation. Archived storage is billed separately through pay-as-you-go, at $0.05 per GB per month once archived plus active storage exceeds the tenant allocation.

About the author
Mark Smith - Co-Founder, SmiKar Software

Mark Smith co-founded SmiKar Software in 2015 and has spent the past decade helping organisations solve Microsoft 365 data management challenges. He works with the SmiKar team to build solutions for SharePoint archiving, storage optimisation, governance and compliance, supporting customers from growing businesses through to Fortune 500 enterprises.

More about SmiKar

Ready when you are

Cut your Microsoft 365 storage bill - keep your data in your tenant.