diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOApplication.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOApplication.md index 3e240a3bb..b09844fb2 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOApplication.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOApplication.md @@ -86,22 +86,6 @@ Accept wildcard characters: False Use this parameter to get details about applications registered in the specified tenant. -The following details are returned: - -- OwningApplicationId - -- OwningApplicationName - -- Applications (by id) - -- SharingCapability - -- OverrideTenantSharingCapability - -- CopilotEmbeddedChatHosts - -- ItemMajorVersionLimit - ```yaml Type: System.Guid Parameter Sets: (All) diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOContainerTenantApplyFileVersionPolicyJobImpact.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOContainerTenantApplyFileVersionPolicyJobImpact.md new file mode 100644 index 000000000..d8a3e959b --- /dev/null +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOContainerTenantApplyFileVersionPolicyJobImpact.md @@ -0,0 +1,106 @@ +--- +external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml +Module Name: Microsoft.Online.SharePoint.PowerShell +online version: https://learn.microsoft.com/powershell/module/microsoft.online.sharepoint.powershell/get-spocontainertenantapplyfileversionpolicyjobimpact +applicable: SharePoint Online +title: Get-SPOContainerTenantApplyFileVersionPolicyJobImpact +schema: 2.0.0 +author: guptapriyan2001 +ms.author: guptapriyan +ms.reviewer: +manager: srikrg +--- + +# Get-SPOContainerTenantApplyFileVersionPolicyJobImpact + +## SYNOPSIS + +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 for a SharePoint Embedded (SPE) container type. 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 + +``` +Get-SPOContainerTenantApplyFileVersionPolicyJobImpact -ContainerTypeId + -VersionPolicy [] +``` + +## DESCRIPTION + +Queries the version dataset collected by a previously completed `New-SPOContainerTenantApplyFileVersionPolicyJob -CollectVersionData` job for the specified SharePoint Embedded (SPE) container type, 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 `-CollectVersionData` for the same container type is required before running this cmdlet. Use `Get-SPOContainerTenantApplyFileVersionPolicyJobProgress` to confirm the job has completed. +> - The estimate is based on a snapshot collected during the job and may not reflect changes made to the container type 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 +```powershell +$policy = Get-SPOTenantVersionPolicy | Get-SPOVersionPolicyWithChanges -MajorVersionLimit 50 +Get-SPOContainerTenantApplyFileVersionPolicyJobImpact -ContainerTypeId -VersionPolicy $policy +``` + +Estimates the impact of a trimming job run with a modified policy that limits to 50 major versions for the specified container type. + +## PARAMETERS + +### -ContainerTypeId +The ID of the SharePoint Embedded container type to evaluate. + +```yaml +Type: Guid +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VersionPolicy +The version policy to evaluate. Use `Get-SPOTenantVersionPolicy` and `Get-SPOVersionPolicyWithChanges` to build this value. + +```yaml +Type: SPOFileVersionPolicySettings +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-ProgressAction`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters). + +## INPUTS + +### None + +## OUTPUTS + +### Microsoft.Online.SharePoint.TenantAdministration.SPOTenantVersionPolicyImpact + +## NOTES + +## RELATED LINKS + +[New-SPOContainerTenantApplyFileVersionPolicyJob](New-SPOContainerTenantApplyFileVersionPolicyJob.md) + +[Get-SPOContainerTenantApplyFileVersionPolicyJobProgress](Get-SPOContainerTenantApplyFileVersionPolicyJobProgress.md) + +[Get-SPOTenantVersionPolicy](Get-SPOTenantVersionPolicy.md) + +[Get-SPOVersionPolicyWithChanges](Get-SPOVersionPolicyWithChanges.md) + +[SharePoint Advanced Management](/sharepoint/sharepoint-advanced-management-licensing) + +[Microsoft 365 Copilot](/microsoft-365/copilot/microsoft-365-copilot-licensing) diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOContainerTenantApplyFileVersionPolicyJobProgress.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOContainerTenantApplyFileVersionPolicyJobProgress.md new file mode 100644 index 000000000..c080633b7 --- /dev/null +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Get-SPOContainerTenantApplyFileVersionPolicyJobProgress.md @@ -0,0 +1,79 @@ +--- +external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml +Module Name: Microsoft.Online.SharePoint.PowerShell +online version: https://learn.microsoft.com/powershell/module/microsoft.online.sharepoint.powershell/get-spocontainertenantapplyfileversionpolicyjobprogress +applicable: SharePoint Online +title: Get-SPOContainerTenantApplyFileVersionPolicyJobProgress +schema: 2.0.0 +author: guptapriyan2001 +ms.author: guptapriyan +ms.reviewer: +manager: srikrg +--- + +# Get-SPOContainerTenantApplyFileVersionPolicyJobProgress + +## SYNOPSIS + +Gets the status for an apply file version policy job for a SharePoint Embedded (SPE) container type. 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 + +``` +Get-SPOContainerTenantApplyFileVersionPolicyJobProgress -ContainerTypeId [] +``` + +## DESCRIPTION + +Gets the status for an apply file version policy job that was queued for the specified SharePoint Embedded (SPE) container type. + +## EXAMPLES + +### Example 1 +```powershell +Get-SPOContainerTenantApplyFileVersionPolicyJobProgress -ContainerTypeId +``` + +Example 1 gets the status for the apply file version policy job of the specified container type. + +## PARAMETERS + +### -ContainerTypeId +The ID of the SharePoint Embedded container type whose job status is retrieved. + +```yaml +Type: Guid +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-ProgressAction`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters). + +## INPUTS + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS + +[New-SPOContainerTenantApplyFileVersionPolicyJob](New-SPOContainerTenantApplyFileVersionPolicyJob.md) + +[Remove-SPOContainerTenantApplyFileVersionPolicyJob](Remove-SPOContainerTenantApplyFileVersionPolicyJob.md) + +[SharePoint Advanced Management](/sharepoint/sharepoint-advanced-management-licensing) + +[Microsoft 365 Copilot](/microsoft-365/copilot/microsoft-365-copilot-licensing) diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md index 844a66306..947ad8d21 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Microsoft.Online.SharePoint.PowerShell.md @@ -158,6 +158,12 @@ Get the current state of Microsoft-provided SharePoint site templates displayed ### [Get-SPOContainer](Get-SPOContainer.md) Returns one or more containers in a SharePoint Embedded application. +### [Get-SPOContainerTenantApplyFileVersionPolicyJobImpact](Get-SPOContainerTenantApplyFileVersionPolicyJobImpact.md) +Estimates the impact of applying a file version policy across all containers of a SharePoint Embedded container type. + +### [Get-SPOContainerTenantApplyFileVersionPolicyJobProgress](Get-SPOContainerTenantApplyFileVersionPolicyJobProgress.md) +Returns the progress of the file version policy job for a SharePoint Embedded container type. + ### [Get-SPOContainerType](Get-SPOContainerType.md) Returns one or more container types created in the tenant. @@ -473,6 +479,9 @@ Invokes a job to swap the location of a site with another site while archiving t ### [New-SPOAppBillingPolicy](New-SPOAppBillingPolicy.md) Creates a new billing policy for an application owned by the tenant. +### [New-SPOContainerTenantApplyFileVersionPolicyJob](New-SPOContainerTenantApplyFileVersionPolicyJob.md) +Queues a job to apply a file version policy across all containers of a SharePoint Embedded container type. + ### [New-SPOContainerType](New-SPOContainerType.md) This cmdlet creates a new container type of standard or trial status. The standard container type can be created with the regular billing structure or direct to customer billing structure. @@ -533,6 +542,9 @@ Removes billing policy associated with the application. ### [Remove-SPOContainer](Remove-SPOContainer.md) Sends a Container to the Recycle Bin. +### [Remove-SPOContainerTenantApplyFileVersionPolicyJob](Remove-SPOContainerTenantApplyFileVersionPolicyJob.md) +Cancels the file version policy job for a SharePoint Embedded container type. + ### [Remove-SPOContainerType](Remove-SPOContainerType.md) This cmdlet removes the container type specified from the tenant. diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOContainerTenantApplyFileVersionPolicyJob.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOContainerTenantApplyFileVersionPolicyJob.md new file mode 100644 index 000000000..78d1871c4 --- /dev/null +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/New-SPOContainerTenantApplyFileVersionPolicyJob.md @@ -0,0 +1,226 @@ +--- +external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml +Module Name: Microsoft.Online.SharePoint.PowerShell +online version: https://learn.microsoft.com/powershell/module/microsoft.online.sharepoint.powershell/new-spocontainertenantapplyfileversionpolicyjob +applicable: SharePoint Online +title: New-SPOContainerTenantApplyFileVersionPolicyJob +schema: 2.0.0 +author: guptapriyan2001 +ms.author: guptapriyan +ms.reviewer: +manager: srikrg +--- + +# New-SPOContainerTenantApplyFileVersionPolicyJob + +## SYNOPSIS + +Queues a job to apply a file version policy across all containers of a SharePoint Embedded (SPE) container type. 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 + +### WithExistingVersionPolicy (Default) +``` +New-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId [-TrimVersions] [-SetVersionPolicy] + [-WhatIf] [-Confirm] [] +``` + +### WithVersionPolicy +``` +New-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId [-TrimVersions] + -VersionPolicy [-WhatIf] [-Confirm] [] +``` + +### CollectData +``` +New-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId [-CollectVersionData] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION + +Queues a job to apply a file version policy across all containers that belong to the specified SharePoint Embedded (SPE) container type. The job trims existing file versions and/or sets version policy for existing containers based on the version policy supplied for the container type. + +> [!NOTE] +> - Versions deleted using this cmdlet will be permanently deleted and cannot be recovered from the recycle bin. +> - Only one job is allowed per container type. +> - Use `-CollectVersionData` first and wait for the job to complete before running `Get-SPOContainerTenantApplyFileVersionPolicyJobImpact` to estimate the impact of a policy without deleting any versions. + +## EXAMPLES + +### Example 1 +```powershell +New-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId -TrimVersions -SetVersionPolicy +``` + +Example 1 starts a job to trim existing versions and set version policy for existing containers of the specified container type. + +### Example 2 +```powershell +New-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId -TrimVersions +``` + +Example 2 starts a job to trim existing versions for files in containers of the specified container type. + +### Example 3 +```powershell +New-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId -SetVersionPolicy +``` + +Example 3 starts a job to set version policy for existing containers of the specified container type. + +### Example 4 +```powershell +New-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId -CollectVersionData +``` + +Example 4 starts a job to collect version data across all containers of the specified container type. Once the job completes, use `Get-SPOContainerTenantApplyFileVersionPolicyJobImpact` to estimate the impact of a version policy without deleting any versions. + +### Example 5 +```powershell +$policy = Get-SPOTenantVersionPolicy | Get-SPOVersionPolicyWithChanges -MajorVersionLimit 100 +New-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId -TrimVersions -VersionPolicy $policy +``` + +Example 5 builds a version policy that limits to 100 major versions locally, then starts a trim job that applies that policy to the specified container type. + +## PARAMETERS + +### -ContainerTypeId +The ID of the SharePoint Embedded container type to which the job applies. + +```yaml +Type: Guid +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SetVersionPolicy +Sets version policy for existing containers of the container type based on the container-type file version policy. The version policy applies to new versions created in these existing containers. Cannot be combined with `-VersionPolicy` or `-CollectVersionData`. + +```yaml +Type: SwitchParameter +Parameter Sets: WithExistingVersionPolicy +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CollectVersionData +Collects version data across all containers of the container type for use with `Get-SPOContainerTenantApplyFileVersionPolicyJobImpact`. Use this switch to run a data-collection pass before deciding whether and how to trim versions. The job does not delete any versions. Cannot be combined with `-VersionPolicy` or `-SetVersionPolicy`. + +```yaml +Type: SwitchParameter +Parameter Sets: CollectData +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TrimVersions +Trims existing versions for files in containers of the container type based on the container-type file version policy. + +```yaml +Type: SwitchParameter +Parameter Sets: WithExistingVersionPolicy, WithVersionPolicy +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VersionPolicy +The version policy to apply to the container type before starting the job. When specified, the container-type version policy is updated and propagated to its containers. Optionally combine with `-TrimVersions` to also trim existing versions. + +Use `Get-SPOTenantVersionPolicy` and `Get-SPOVersionPolicyWithChanges` to build this value. + +```yaml +Type: SPOFileVersionPolicySettings +Parameter Sets: WithVersionPolicy +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-ProgressAction`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters). + +## INPUTS + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS + +[Get-SPOContainerTenantApplyFileVersionPolicyJobProgress](Get-SPOContainerTenantApplyFileVersionPolicyJobProgress.md) + +[Get-SPOContainerTenantApplyFileVersionPolicyJobImpact](Get-SPOContainerTenantApplyFileVersionPolicyJobImpact.md) + +[Remove-SPOContainerTenantApplyFileVersionPolicyJob](Remove-SPOContainerTenantApplyFileVersionPolicyJob.md) + +[Get-SPOTenantVersionPolicy](Get-SPOTenantVersionPolicy.md) + +[Get-SPOVersionPolicyWithChanges](Get-SPOVersionPolicyWithChanges.md) + +[SharePoint Advanced Management](/sharepoint/sharepoint-advanced-management-licensing) + +[Microsoft 365 Copilot](/microsoft-365/copilot/microsoft-365-copilot-licensing) diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Remove-SPOContainerTenantApplyFileVersionPolicyJob.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Remove-SPOContainerTenantApplyFileVersionPolicyJob.md new file mode 100644 index 000000000..ff958ebef --- /dev/null +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Remove-SPOContainerTenantApplyFileVersionPolicyJob.md @@ -0,0 +1,114 @@ +--- +external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml +Module Name: Microsoft.Online.SharePoint.PowerShell +online version: https://learn.microsoft.com/powershell/module/microsoft.online.sharepoint.powershell/remove-spocontainertenantapplyfileversionpolicyjob +applicable: SharePoint Online +title: Remove-SPOContainerTenantApplyFileVersionPolicyJob +schema: 2.0.0 +author: guptapriyan2001 +ms.author: guptapriyan +ms.reviewer: +manager: srikrg +--- + +# Remove-SPOContainerTenantApplyFileVersionPolicyJob + +## SYNOPSIS + +Stops further processing of an apply file version policy job that is in progress for a SharePoint Embedded (SPE) container type. 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 + +``` +Remove-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION + +Stops further processing of an apply file version policy job that is in progress for the specified SharePoint Embedded (SPE) container type. + +> [!NOTE] +> - If the job was queued by using `New-SPOContainerTenantApplyFileVersionPolicyJob` with the `TrimVersions` parameter, this stops creating new sub-jobs that trim versions for containers. This does not affect versions that were already permanently deleted while the job was running. +> - If the job was queued by using `New-SPOContainerTenantApplyFileVersionPolicyJob` with the `SetVersionPolicy` parameter, this stops creating new sub-jobs that apply the new version policy to existing containers. The version policies that were already applied remain in place and will not be reverted. + +## EXAMPLES + +### Example 1 +```powershell +Remove-SPOContainerTenantApplyFileVersionPolicyJob -ContainerTypeId +``` + +Example 1 cancels further processing of the apply file version policy job for the specified container type. + +## PARAMETERS + +### -ContainerTypeId +The ID of the SharePoint Embedded container type whose job is canceled. + +```yaml +Type: Guid +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-ProgressAction`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters). + +## INPUTS + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS + +[New-SPOContainerTenantApplyFileVersionPolicyJob](New-SPOContainerTenantApplyFileVersionPolicyJob.md) + +[Get-SPOContainerTenantApplyFileVersionPolicyJobProgress](Get-SPOContainerTenantApplyFileVersionPolicyJobProgress.md) + +[SharePoint Advanced Management](/sharepoint/sharepoint-advanced-management-licensing) + +[Microsoft 365 Copilot](/microsoft-365/copilot/microsoft-365-copilot-licensing) diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOApplication.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOApplication.md index 6765cb47a..03fb12635 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOApplication.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOApplication.md @@ -22,6 +22,9 @@ Set-SPOApplication [-OwningApplicationId] [[-SharingCapability] ] [[-CopilotEmbeddedChatHosts] ] [[-ItemMajorVersionLimit] ] + [[-EnableAutoExpirationVersionTrim] ] [[-ExpireVersionsAfterDays] ] + [[-FileTypesForVersionExpiration] ] + [[-RemoveVersionExpirationFileTypeOverride] ] [] ``` @@ -77,6 +80,34 @@ Set-SPOApplication -OwningApplicationId 423poi45 -ItemMajorVersionLimit 1000 ``` This example sets the ItemMajorVersionLimit to 1000. +### Example 6 + +```powershell +Set-SPOApplication -OwningApplicationId 423poi45 -EnableAutoExpirationVersionTrim $true +``` +This example enables automatic version history trimming for the application's containers. When automatic trimming is enabled, `ExpireVersionsAfterDays` and `ItemMajorVersionLimit` are managed automatically and cannot be set at the same time. + +### Example 7 + +```powershell +Set-SPOApplication -OwningApplicationId 423poi45 -EnableAutoExpirationVersionTrim $false -ItemMajorVersionLimit 500 -ExpireVersionsAfterDays 180 +``` +This example disables automatic trimming and sets a manual version policy. When `EnableAutoExpirationVersionTrim` is `$false`, both `ItemMajorVersionLimit` and `ExpireVersionsAfterDays` must be specified. + +### Example 8 + +```powershell +Set-SPOApplication -OwningApplicationId 423poi45 -ExpireVersionsAfterDays 365 -FileTypesForVersionExpiration "docx","xlsx" +``` +This example applies the version-expiration policy to the specified file types. + +### Example 9 + +```powershell +Set-SPOApplication -OwningApplicationId 423poi45 -RemoveVersionExpirationFileTypeOverride "docx","xlsx" +``` +This example removes the file-type version-expiration overrides for the specified file types. `RemoveVersionExpirationFileTypeOverride` cannot be combined with any other version policy parameter. + ## PARAMETERS ### -CopilotEmbeddedChatHosts @@ -132,7 +163,7 @@ Accept wildcard characters: False ### -ItemMajorVersionLimit -This parameter is used to override ItemMajorVersionLimit for container types. +This parameter is used to override ItemMajorVersionLimit for container types. Valid values are between 1 and 50000. ```yaml Type: Int @@ -146,6 +177,73 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableAutoExpirationVersionTrim + +Enables or disables automatic file version history trimming for the SharePoint Embedded application's containers. + +- `$true` - Version history limits are managed automatically. `ExpireVersionsAfterDays` and `ItemMajorVersionLimit` cannot be specified at the same time. +- `$false` - A manual version policy is used. Both `ItemMajorVersionLimit` and `ExpireVersionsAfterDays` must be specified. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExpireVersionsAfterDays + +The number of days after which file versions expire. A value of 0 means versions never expire. Otherwise the value must be between 30 and 36500. This parameter cannot be used when `EnableAutoExpirationVersionTrim` is `$true`. + +```yaml +Type: Int +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FileTypesForVersionExpiration + +The file types whose version-expiration policy should be updated. The array cannot be empty, and at least one of `EnableAutoExpirationVersionTrim`, `ItemMajorVersionLimit`, or `ExpireVersionsAfterDays` must also be specified. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RemoveVersionExpirationFileTypeOverride + +The file-type version-expiration overrides to remove. The array cannot be empty. This parameter is exclusive and cannot be combined with `FileTypesForVersionExpiration`, `EnableAutoExpirationVersionTrim`, `ItemMajorVersionLimit`, or `ExpireVersionsAfterDays`. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SharingCapability Determines what level of sharing is available for the SharePoint Embedded Application.