Get-SPOTenantApplyFileVersionPolicyJobImpact
Estimates how many versions would be trimmed and how much storage would be freed if a trimming job were run with the given version policy. SharePoint Advanced Management license or Copilot license is required to run this cmdlet.
Note
This feature is currently in preview and may not be available in your tenant.
Syntax
Default (Default)
Get-SPOTenantApplyFileVersionPolicyJobImpact
-VersionPolicy <SPOFileVersionPolicySettings>
[<CommonParameters>]
Description
Queries the version dataset collected by a previously completed New-SPOTenantApplyFileVersionPolicyJob -CollectVersionData job and returns an estimated impact object showing how many versions would be trimmed and how much storage would be freed if a trimming job were run with the given version policy.
Note
- A completed job that was started with
-CollectVersionDatais required before running this cmdlet. UseGet-SPOTenantApplyFileVersionPolicyJobProgressto confirm the job has completed. - The estimate is based on a snapshot collected during the job and may not reflect changes made to the tenant after the job ran.
- The estimate does not account for versions protected by retention policies, retention labels, or eDiscovery holds. Actual versions deleted may be fewer than estimated.
Examples
Example 1
$policy = Get-SPOTenantVersionPolicy | Get-SPOVersionPolicyWithChanges -MajorVersionLimit 50
Get-SPOTenantApplyFileVersionPolicyJobImpact -VersionPolicy $policy
Estimates the impact of a trimming job run with a modified policy that limits to 50 major versions.
Parameters
-VersionPolicy
The version policy to evaluate. Use Get-SPOTenantVersionPolicy and Get-SPOVersionPolicyWithChanges to build this value.
Parameter properties
| Type: | SPOFileVersionPolicySettings |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.