Edit

Share via


Set-MyAnalyticsFeatureConfig

This cmdlet is available only in the Exchange Online PowerShell module. For more information, see About the Exchange Online PowerShell module.

Use the Set-MyAnalyticsFeatureConfig cmdlet to configure the availability and features of MyAnalytics for the specified user.

Note: This cmdlet replaces the Set-UserAnalyticsConfig cmdlet.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Default (Default)

Set-MyAnalyticsFeatureConfig
    -Identity <String>
    [-Feature <String>]
    [-IsEnabled <Boolean>]
    [-PrivacyMode <String>]
    [-ResultSize <Unlimited>]
    [<CommonParameters>]

Description

This cmdlet requires the .NET Framework 4.7.2 or later.

To run this cmdlet, you need to be a member of one of the following directory role groups in the destination organization:

  • Global Administrator
  • Exchange Administrator
  • Insights Administrator

To learn more about administrator role permissions in Microsoft Entra ID, see Role template IDs.

Important

Microsoft recommends that you use roles with the fewest permissions. Using lower permissioned accounts helps improve security for your organization. Global Administrator is a highly privileged role that should be limited to emergency scenarios when you can't use an existing role.

Examples

Example 1

Set-MyAnalyticsFeatureConfig -Identity vikram@contoso.com -PrivacyMode opt-in

This example makes MyAnalytics and all features available to Vikram.

Example 2

Set-MyAnalyticsFeatureConfig -Identity swathy@contoso.com -PrivacyMode opt-in -Feature digest-email -IsEnabled $false

This example makes MyAnalytics available to Swathy, but disables the digest email feature.

Example 3

Set-MyAnalyticsFeatureConfig -Identity akshath@contoso.com -Feature digest-email -IsEnabled $false

This example disables the digest email feature for Akshath.

Parameters

-Feature

Applicable: Exchange Online

The Feature parameter specifies the MyAnalytics features to enable or disable for the user. Valid values are:

  • all (this is the default value)
  • add-in
  • dashboard
  • digest-email

To actually enable or disable a feature that's specified by this parameter, use the IsEnabled parameter in the same command.

Parameter properties

Type:String
Default value:None
Accepted values:dashboard, add-in, digest-email, all
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Exchange Online

The Identity parameter specifies the user you want to view. You identify the user by their email address.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IsEnabled

Applicable: Exchange Online

The IsEnabled parameter specifies whether to enable or disable the feature that's specified by the Feature parameter. Valid values are:

  • $true: The specified feature is enabled.
  • $false: The specified feature is disabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrivacyMode

Applicable: Exchange Online

The PrivacyMode parameter specifies whether to enable or disable MyAnalytics for the specified user. Valid values are:

-opt-in: MyAnalytics is enabled for the user. Use the Feature and IsEnabled parameters to enable or disable specific MyAnalytics features. -opt-out: MyAnalytics is disabled for the user.

Parameter properties

Type:String
Default value:None
Accepted values:opt-in, opt-out
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResultSize

Applicable: Exchange Online

This parameter is reserved for internal Microsoft use.

Parameter properties

Type:Unlimited
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.