diff --git a/documentation/Set-PnPTenant.md b/documentation/Set-PnPTenant.md index f72dd275b..7fde9a05f 100644 --- a/documentation/Set-PnPTenant.md +++ b/documentation/Set-PnPTenant.md @@ -2569,6 +2569,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -KnowledgeAgentEnabled + +Enables or disables the Knowledge Agent feature tenant-wide. When set to $true, the Knowledge Agent functionality is enabled for the tenant; when set to $false it is disabled. Use this parameter to control tenant-level Knowledge Agent behavior. + +```yaml +Type: Boolean +Parameter Sets: (All) + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AllowSensitivityLabelOnRecords Allows sensitivity label on records. diff --git a/src/Commands/Admin/SetTenant.cs b/src/Commands/Admin/SetTenant.cs index 34da0624a..e8f182095 100644 --- a/src/Commands/Admin/SetTenant.cs +++ b/src/Commands/Admin/SetTenant.cs @@ -429,6 +429,9 @@ public class SetTenant : PnPSharePointOnlineAdminCmdlet [Parameter(Mandatory = false)] public bool? AIBuilderEnabled { get; set; } + [Parameter(Mandatory = false)] + public bool? KnowledgeAgentEnabled { get; set; } + [Parameter(Mandatory = false)] public bool? AllowSensitivityLabelOnRecords { get; set; } @@ -1668,6 +1671,11 @@ protected override void ExecuteCmdlet() Tenant.DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites = DelayDenyAddAndCustomizePagesEnforcementOnClassicPublishingSites.Value; modified = true; } + if (KnowledgeAgentEnabled.HasValue) + { + Tenant.KnowledgeAgentEnabled = KnowledgeAgentEnabled.Value; + modified = true; + } if (GuestSharingGroupAllowListInTenantByPrincipalIdentity != null) { if (GuestSharingGroupAllowListInTenantByPrincipalIdentity.Length > 0)