Commands › Exchange Online
Add-VivaModuleFeaturePolicy
2.0 or later. For more information, see About the Exchange Online PowerShell module. Use the Add-VivaModuleFeaturePolicy cmdlet to add a new access policy for a specific feature in Viva. The attributes of the policy are defined using the cmdlet parameters. Policies are used to restrict or grant access to the specified feature for specific users, groups, or the entire tenant. - You can assign up to 10 policies per feature. An additional one policy per feature can be assigned to the entire tenant. - Policies assigned to a specific user or group take priority over the policy assigned to the entir
Quick start script
# Add-VivaModuleFeaturePolicy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Run and inspect
Add-VivaModuleFeaturePolicy -FeatureId <String> -IsFeatureEnabled <Boolean> -ModuleId <String> | Format-List
# 3. Export for evidence / drift tracking
Add-VivaModuleFeaturePolicy | Export-Clixml .\VivaModuleFeaturePolicy-$(Get-Date -Format yyyyMMdd).xml
Syntax
Add-VivaModuleFeaturePolicy -FeatureId <String> -IsFeatureEnabled <Boolean> -ModuleId <String> -Name <String>
[-Confirm]
[-Everyone]
[-GroupIds <String[]>]
[-IsUserControlEnabled <Boolean>]
[-IsUserOptedInByDefault <Boolean>]
[-ResultSize <Unlimited>]
[-UserIds <String[]>]
[-WhatIf]
[<CommonParameters>]
Parameters (12)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.