fr-FR

SPOFileArchivePolicy

S’applique à : SharePoint Online

La documentation Microsoft de ces stratégies n’existe qu’en anglais : les descriptions ci-dessous ne sont pas traduites.

Updates an existing file archive policy.

This cmdlet updates the properties of an existing file archive policy. Only the parameters that are specified will be updated; all other properties remain unchanged. You cannot set the State to Active unless the PolicyType is AllSites or AllODBSites, or at least one site has been added to the policy using Add-SPOSiteToFileArchivePolicy.

Cmdlets disponibles

Paramètres

Nom Type Valeur par défaut Valeurs acceptées
FileTypeCriteria String[]
FileTypeExclusionCriteria String[]
IsWhatIfMode Boolean
LastAccessDateCriteria Int32
Name String
PolicyId Guid
PolicyType SPOFileArchivePolicyType AllSites, SelectedSites, AllODBSites
State SPOFileArchivePolicyState Active, Inactive

Exemples

Example 1

Set-SPOFileArchivePolicy -PolicyId "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -State "Active"

Activates the specified file archive policy.

Example 2

Set-SPOFileArchivePolicy -PolicyId "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Name "Updated Policy Name" -LastAccessDateCriteria 12

Updates the display name and changes the last access date criteria to 12 months for the specified policy.

Example 3

Set-SPOFileArchivePolicy -PolicyId "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -IsWhatIfMode $true

Enables WhatIf mode on the specified policy. Future policy runs will report eligible files without archiving them.

Documentation Microsoft Learn