Skip to content

Commit

Permalink
Merge pull request #3238 from KoenZomers/AddMediaTranscriptionToSetPn…
Browse files Browse the repository at this point in the history
…PTenant

Added `-MediaTranscription` and `-MediaTranscriptionAutomaticFeatures` to `Set-PnPTenant`
  • Loading branch information
gautamdsheth committed Jul 3, 2023
2 parents 1b3b053 + 30c5864 commit 4b14c7c
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 33 additions & 1 deletion documentation/Set-PnPTenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ Set-PnPTenant [-SpecialCharactersStateInFileFolderNames <SpecialCharactersState>
[-ExcludedBlockDownloadGroupIds <GUID[]>]
[-ArchiveRedirectUrl <String>]
[-StopNew2013Workflows <Boolean>]
[-MediaTranscription <MediaTranscriptionPolicyType>]
[-MediaTranscriptionAutomaticFeatures <MediaTranscriptionAutomaticFeaturesPolicyType>]
[-Force] [-Connection <PnPConnection>]
```

Expand Down Expand Up @@ -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

Expand All @@ -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)
20 changes: 19 additions & 1 deletion src/Commands/Admin/SetTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4b14c7c

Please sign in to comment.