Skip to content

Add File Archive Policy cmdlet documentation#1181

Merged
Ruchika-mittal01 merged 7 commits into
MicrosoftDocs:mainfrom
HectorRMota:main
Jun 17, 2026
Merged

Add File Archive Policy cmdlet documentation#1181
Ruchika-mittal01 merged 7 commits into
MicrosoftDocs:mainfrom
HectorRMota:main

Conversation

@HectorRMota

Copy link
Copy Markdown
Contributor

Summary

This PR adds reference documentation for the SharePoint Online File Archive Policy cmdlets. These cmdlets allow SharePoint and Global Administrators to create, configure, monitor, and manage file archive policies that automatically archive files based on criteria such as last access date and file type.

New cmdlets documented

Cmdlet Description
New-SPOFileArchivePolicy Creates a new File Archive Policy for the tenant
Get-SPOFileArchivePolicy Gets one or all File Archive Policies for the tenant
Get-SPOFileArchivePolicyReport Gets the report for a File Archive Policy
Get-SPOFileArchivePolicySites Gets the sites associated with a File Archive Policy
Set-SPOFileArchivePolicy Updates an existing File Archive Policy
Remove-SPOFileArchivePolicy Removes a File Archive Policy
Add-SPOSiteToFileArchivePolicy Adds a site to a File Archive Policy
Remove-SPOSiteToFileArchivePolicy Removes a site from a File Archive Policy

Details

  • Module: Microsoft.Online.SharePoint.PowerShell
  • All cmdlets require SharePoint Administrator or Global Administrator role

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 5931a42:

⚠️ Validation status: warnings

File Status Preview URL Details
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md ⚠️Warning View (sharepoint-ps) Details
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Add-SPOSiteToFileArchivePolicy.md ✅Succeeded View (sharepoint-ps)
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOFileArchivePolicy.md ✅Succeeded View (sharepoint-ps)
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOFileArchivePolicyReport.md ✅Succeeded View (sharepoint-ps)
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOFileArchivePolicySites.md ✅Succeeded View (sharepoint-ps)
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOFileArchivePolicy.md ✅Succeeded View (sharepoint-ps)
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Remove-SPOFileArchivePolicy.md ✅Succeeded View (sharepoint-ps)
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Remove-SPOSiteToFileArchivePolicy.md ✅Succeeded View (sharepoint-ps)
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOFileArchivePolicy.md ✅Succeeded View (sharepoint-ps)

sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md

  • Line 0, Column 0: [Warning: PSMD2Yaml_InconsistentCmdletsInModule] Inconsistent cmdlets found in module: Microsoft.Online.SharePoint.PowerShell. 8 cmdlets in the module folder but not listed in the module file: Add-SPOSiteToFileArchivePolicy, Get-SPOFileArchivePolicy, Get-SPOFileArchivePolicyReport, Get-SPOFileArchivePolicySites, New-SPOFileArchivePolicy, Remove-SPOFileArchivePolicy, Remove-SPOSiteToFileArchivePolicy, Set-SPOFileArchivePolicy.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Added, updated, and removed cmdlet documentation for File Archive Policies.
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@github-actions github-actions Bot requested a review from sachin-lalwani June 16, 2026 23:33
@github-actions

Copy link
Copy Markdown

@sachin-lalwani
You've been added as a reviewer to this pull request because you're listed as a Content Lead for the product area or feature covered by one or more articles in this PR.

Before this PR can be merged, a Content Lead needs to add the Sign off label to it. Only one of the listed reviewers needs to add the Sign off label. Before you sign off a PR, confirm the following:

  • The PR is not in draft state. When the changes in this PR are ready to be published, select the Ready to merge button at the bottom of the page.
  • Article content has been checked for technical accuracy.
  • There are no errors or warnings in build validation.
  • There are no severity 1 or 2 PoliCheck issues.
  • All required PR checks at the bottom of the PR are passing.

After you've confirmed the above, do the following to sign off:

  1. Select the gear next to Labels.
  2. Select Sign off from the label list.
  3. Click away from the label list.

image

After you've signed off, our operations (PubOps) team will review the PR for issues that may impact formatting and the customer experience. If any changes are needed, they will return
the PR to the submitter with required changes. After they've completed those changes, you need to sign off again.

When the PR passes PubOps review, they'll merge the PR. If the PR is merged into the main branch, changes will go live within the next couple hours.

If you think you were incorrectly added as a reviewer, have questions about this process, or need help signing off on this PR, post a message to https://aka.ms/tcphelp.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

@samkabue

samkabue commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

fill in this section -- you have a whole lot of related cmdlets, so this is the place you place them. See how other .md files are doing it.

applies to this file and others #Closed


Refers to: sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Add-SPOSiteToFileArchivePolicy.md:80 in 440e7e3. [](commit_id = 440e7e3, deletion_comment = False)

@samkabue samkabue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

@samkabue samkabue added Back to submitter The pull request didn't pass the review criteria and has been returned to the writer for updates Microsoft submitter labels Jun 17, 2026
- Add missing front matter properties (applicable, title, author, ms.author, ms.reviewer)
- Use 'This cmdlet...' instead of repeating cmdlet name in descriptions
- Remove assumed admin role requirement line
- Remove 'PS C:\>' prefix from examples
- Use lowercase 'file archive policy' instead of Title Case
- Remove (e.g., ...) examples from parameter descriptions
- Update CommonParameters with backtick-formatted params and new URL
- Move preview note from NOTES to Description using [!NOTE] decorator
- Format WhatIf in backticks when referenced in prose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Hector Mota and others added 2 commits June 17, 2026 13:50
- Use backticks instead of quotes for parameter values in prose (SelectedSites, AllSites, Active, Inactive)
- Use [!IMPORTANT] tag for LastAccessDateCriteria July 2025 accuracy note
- Move Inactive state note from NOTES section to Description in New-SPOFileArchivePolicy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…hive policy cmdlets

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

1 similar comment
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

- PolicyType: String -> SPOFileArchivePolicyType (in New-SPO and Set-SPO)
- State: String -> SPOFileArchivePolicyState (in Set-SPO)
- Updated SYNTAX blocks to match

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@HectorRMota HectorRMota requested a review from samkabue June 17, 2026 21:00
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@samkabue samkabue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@samkabue samkabue added Sign off The pull request is ready to be reviewed and merged by PubOps and removed Back to submitter The pull request didn't pass the review criteria and has been returned to the writer for updates labels Jun 17, 2026
@Ruchika-mittal01 Ruchika-mittal01 self-assigned this Jun 17, 2026
@Ruchika-mittal01 Ruchika-mittal01 added the In review PubOps is reviewing the pull request label Jun 17, 2026
@Ruchika-mittal01 Ruchika-mittal01 merged commit aa395da into MicrosoftDocs:main Jun 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In review PubOps is reviewing the pull request Microsoft submitter sharepoint-server-itpro/svc Sign off The pull request is ready to be reviewed and merged by PubOps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants