Commands › Exchange Online

Update-VivaModuleFeaturePolicy

Exchange Online ExchangeOnlineManagement Update-*

2.0 or later. For more information, see About the Exchange Online PowerShell module. Use the Update-VivaModuleFeaturePolicy cmdlet to update an access policy for a feature in a Viva module in Viva. - You can't update a policy for a particular user or group to include the entire tenant if a policy for the entire tenant already exists for the feature. Only one tenant-wide policy is supported. - Policies assigned to a specific user or group take priority over the policy assigned to the entire tenant when determining whether a feature is enabled. If a user has multiple policies assigned for a feat

Quick start script

# Update-VivaModuleFeaturePolicy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-VivaModuleFeaturePolicy
$before | Format-List

# 3. Make the change (dry run first)
Update-VivaModuleFeaturePolicy -FeatureId <String> -ModuleId <String> -PolicyId <String> -WhatIf
Update-VivaModuleFeaturePolicy -FeatureId <String> -ModuleId <String> -PolicyId <String>

# 4. Verify and diff
$after = Get-VivaModuleFeaturePolicy
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Update-VivaModuleFeaturePolicy -FeatureId <String> -ModuleId <String> -PolicyId <String>
 [-Confirm]
 [-Everyone <Boolean>]
 [-IsFeatureEnabled <Boolean>]
 [-IsUserControlEnabled <Boolean>]
 [-IsUserOptedInByDefault <Boolean>]
 [-GroupIds <String[]>]
 [-Name <String>]
 [-ResultSize <Unlimited>]
 [-UserIds <String[]>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (13)

ParameterTypeRequiredWhat it controls
-FeatureId String yes The FeatureId parameter specifies the feature in the Viva module of the policy that you want to update.
-ModuleId String yes The ModuleId parameter specifies the Viva module of the policy that you want to update.
-PolicyId String yes The PolicyId parameter specifies the policy for the feature in the Viva module that you want to update.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-Everyone Boolean The Everyone parameter specifies that the updated policy applies to all users in the organization. Valid values are:
-GroupIds String[] The GroupIds parameter specifies the email addresses or security group object IDs (GUIDs) of groups that the updated policy applies to. Both [Mail-enabled and non-mail-enabled Microsoft Entra...
-IsFeatureEnabled Boolean The IsFeatureEnabled parameter specifies whether the feature is enabled by the updated policy. Valid values are:
-IsUserControlEnabled Boolean **Note**: This parameter is available in module version 3.3.0-Preview1 or later. If the feature supports user controls for opting out, be sure to set the *IsUserControlEnabled* parameter when you create the policy....
-IsUserOptedInByDefault Boolean **Note**: This parameter is available in module version 3.8.0-Preview2 or later.
-Name String The Name parameter specifies the updated name for the policy. The maximum length is 256 characters. If the value contains spaces, enclose the value in quotation marks (").
-ResultSize Unlimited This parameter is reserved for internal Microsoft use.
-UserIds String[] The UserIds parameter specifies the user principal names (UPNs) of users that the updated policy applies to. You can enter multiple values separated by commas.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.