From b082132e25a5cb57da466a27fca85f2f558b73e4 Mon Sep 17 00:00:00 2001 From: Koen Zomers Date: Mon, 3 Jul 2023 01:00:17 +0200 Subject: [PATCH] Added `-MediaTranscription` and `-MediaTranscriptionAutomaticFeatures` to `Set-PnPTenant` which allows for configuring the media transcription settings --- CHANGELOG.md | 6 ++++++ documentation/Set-PnPTenant.md | 34 ++++++++++++++++++++++++++++++++- src/Commands/Admin/SetTenant.cs | 20 ++++++++++++++++++- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef3870dc..01417dce6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Added +- Added `-MediaTranscription` and `-MediaTranscriptionAutomaticFeatures` to `Set-PnPTenant` which allows for configuring the media transcription settings + +### Contributors + +- Koen Zomers [koenzomers] + ## [2.2.0] ### Added diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index cccf1aeb1..498ba259c 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -124,6 +124,8 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames [-ExcludedBlockDownloadGroupIds ] [-ArchiveRedirectUrl ] [-StopNew2013Workflows ] + [-MediaTranscription ] + [-MediaTranscriptionAutomaticFeatures ] [-Force] [-Connection ] ``` @@ -2104,6 +2106,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -MediaTranscription + +When the feature is enabled, videos can have transcripts generated on demand or generated automatically in certain scenarios. This is the default because the policy is default on. If a video owner decides they don’t want the transcript, they can always hide or delete it from that video. Possible values: Enabled, Disabled. + +```yaml +Type: MediaTranscriptionPolicyType +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MediaTranscriptionAutomaticFeatures + +When the feature is enabled, videos can have transcripts generated automatically on upload. The policy is default on. If a tenant admin decides to disable the feature, he can do so by disabling the policy at tenant level. This feature can not be enabled or disabled at site level. Possible values: Enabled, Disabled. + +```yaml +Type: MediaTranscriptionAutomaticFeaturesPolicyType +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Force If provided, no confirmation will be requested and the action will be performed @@ -2120,4 +2152,4 @@ Accept wildcard characters: False ## RELATED LINKS -[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) +[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) \ No newline at end of file diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index 8eee90f10..4876391c0 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -369,7 +369,13 @@ public class SetTenant : PnPAdminCmdlet public string ArchiveRedirectUrl { get; set; } [Parameter(Mandatory = false)] - public bool? BlockSendLabelMismatchEmail { get; set; } + public bool? BlockSendLabelMismatchEmail { get; set; } + + [Parameter(Mandatory = false)] + public MediaTranscriptionPolicyType? MediaTranscription { get; set; } + + [Parameter(Mandatory = false)] + public MediaTranscriptionAutomaticFeaturesPolicyType? MediaTranscriptionAutomaticFeatures { get; set; } protected override void ExecuteCmdlet() { @@ -1234,6 +1240,18 @@ protected override void ExecuteCmdlet() modified = true; } + if (MediaTranscription.HasValue) + { + Tenant.MediaTranscription = MediaTranscription.Value; + modified = true; + } + + if (MediaTranscriptionAutomaticFeatures.HasValue) + { + Tenant.MediaTranscriptionAutomaticFeatures = MediaTranscriptionAutomaticFeatures.Value; + modified = true; + } + if (BlockSendLabelMismatchEmail.HasValue) { Tenant.BlockSendLabelMismatchEmail = BlockSendLabelMismatchEmail.Value;