Set-CMEmailProfile

Sets an email profile.

Syntax

Set-CMEmailProfile
   [-AccountDomainActiveDirectory <String>]
   [-AccountDomainCustom <String>]
   [-AccountName <String>]
   [-AccountUserNameType <String>]
   [-AllowMessageMove <Boolean>]
   [-AllowThirdPartyApplication <Boolean>]
   [-Confirm]
   [-Description <String>]
   [-DisableWildcardHandling]
   [-EmailAddressType <String>]
   [-EnableSmime <Boolean>]
   [-ForceWildcardHandling]
   -Id <Int32>
   [-IdentityCertificate <IResultObject>]
   [-MailSyncDays <MailNumberofDaysToSync>]
   [-NewName <String>]
   [-PassThru]
   [-SigningCertificate <IResultObject>]
   [-SupportedPlatform <IResultObject[]>]
   [-SyncContentType <EasProfileSyncContentType>]
   [-SyncSchedule <Schedule>]
   [-SynchronizeRecentlyUsed <Boolean>]
   [-UseSsl <Boolean>]
   [-WhatIf]
   [<CommonParameters>]
Set-CMEmailProfile [-AccountDomainActiveDirectory ] [-AccountDomainCustom ]
 [-AccountName ] [-AccountUserNameType ] [-AllowMessageMove ]
 [-AllowThirdPartyApplication ] [-Confirm] [-Description ] [-DisableWildcardHandling]
 [-EmailAddressType ] [-EnableSmime ] [-ForceWildcardHandling]
 [-IdentityCertificate ] -InputObject  [-MailSyncDays ]
 [-NewName ] [-PassThru] [-SigningCertificate ] [-SupportedPlatform ]
 [-SyncContentType ] [-SyncSchedule ] [-SynchronizeRecentlyUsed ]
 [-UseSsl ] [-WhatIf] []
Set-CMEmailProfile [-AccountDomainActiveDirectory ] [-AccountDomainCustom ]
 [-AccountName ] [-AccountUserNameType ] [-AllowMessageMove ]
 [-AllowThirdPartyApplication ] [-Confirm] [-Description ] [-DisableWildcardHandling]
 [-EmailAddressType ] [-EnableSmime ] [-ForceWildcardHandling]
 [-IdentityCertificate ] [-MailSyncDays ] -Name 
 [-NewName ] [-PassThru] [-SigningCertificate ] [-SupportedPlatform ]
 [-SyncContentType ] [-SyncSchedule ] [-SynchronizeRecentlyUsed ]
 [-UseSsl ] [-WhatIf] []

Description

The Set-CMEmailProfile cmdlet updates the settings of an Exchange ActiveSync email profile.

Examples

Example 1: Update a profile by name

PS C:\> Set-CMEmailProfile -Name "EmailProfile1" -NewName "newEmailProfile1"

This command updates the name of the Exchange ActiveSync email profile from EmailProfile1 to newEmailProfile1.

Example 2: Update a profile by ID

PS C:\> Set-CMEmailProfile -Id 16795654 -NewName "newEmailProfile2"

This command updates the name of the Exchange ActiveSync email profile with the ID of 16795654 to newEmailProfile2.

Example 3: Update a profile as an input object

PS C:\> $EmailProfile = Get-CMEmailProfile -Name "EmailProfile3"
PS C:\> Set-CMEmailProfile -InputObject $EmailProfile -NewName "newEmailProfile3"

The first command gets the Exchange ActiveSync email profile object named EmailProfile3 and stores the object in the $EmailProfile variable.

The second command changes the name of the email profile stored in $EmailProfile to newEmailProfile3.

Example 4: Use the pipeline to update a profile

PS C:\> Get-CMEmailProfile -Name "EmailProfile4" | Set-CMEmailProfile -NewName "newEmailProfile4"

This command gets the Exchange ActiveSync email profile object named EmailProfile4 and uses the pipeline operator to pass the object to Set-CMEmailProfile, which changes the name of the email profile object to newEmailProfile4.

Required Parameters

-Id

Specifies the CI_ID for an Exchange ActiveSync email profile.

Type:Int32
Aliases:CI_ID, CIId
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies an Exchange ActiveSync email profile object. To obtain an email profile object, use the Get-CMEmailProfile function.

Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of an Exchange ActiveSync email profile.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-AccountDomainActiveDirectory

Specifies the type of Active Directory account domain. Valid values are: - domain

  • ntdomain
Type:String
Parameter Sets:domain, ntdomain
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AccountDomainCustom

Specifies a custom account domain. This parameter can only be used if the sAMAccountName value is specified for the AccountUserNameType parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AccountName

Specifies the display name for the email account.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AccountUserNameType

Specifies an account user name type. Valid values are: - mail

  • sAMAccountName
  • userPrincipalName
Type:String
Parameter Sets:mail, sAMAccountName, userPrincipalName
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AllowMessageMove

Indicate whether users are allowed to move email messages between different accounts they have configured on their device.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AllowThirdPartyApplication

Indicates whether users are allowed to send email from certain non-default, third-party email applications.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the Exchange ActiveSync email profile.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EmailAddressType

Specifies an email address type. Valid values are: - mail

  • userPrincipalName
Type:String
Parameter Sets:mail, userPrincipalName
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableSmime

Indicates whether outgoing email is sent using S/MIME encryption.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IdentityCertificate

Specifies an identity certificate object. To obtain an identity certificate object, use the Get-CMConfigurationPolicy cmdlet.

Type:IResultObject
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MailSyncDays

Specifies the number of days of email to synchronize. Valid values are: - Unlimited

  • OneDay
  • ThreeDays
  • OneWeek
  • TwoWeeks
  • OneMonth
Type:MailNumberofDaysToSync
Parameter Sets:Unlimited, OneDay, ThreeDays, OneWeek, TwoWeeks, OneMonth
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewName

Specifies a new name for an Exchange ActiveSync email profile.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SigningCertificate

Specifies a signing certificate object used for S/MIME signing. To obtain a signing certificate object, use the Get-CMConfigurationPolicy cmdlet.

Type:IResultObject
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SupportedPlatform

Specifies the the operating systems on which the email profile will be installed. To obtain a supported platform object, use the Get-CMSupportedPlatform cmdlet.

Type:IResultObject[]
Aliases:SupportedPlatforms
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SyncContentType

Specifies a content type to synchronize to devices. Valid values are: - None

  • Email
  • Contacts
  • Calendar
  • Tasks
  • Notes
  • All
Type:EasProfileSyncContentType
Aliases:SyncContentTypes
Parameter Sets:None, Email, Contacts, Calendar, Tasks, Notes, All
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SyncSchedule

Specifies the schedule by which devices will synchronize data from the Exchange Server. - Manual

  • FifteenMins
  • ThirtyMins
  • SixtyMins
  • AsArrive
Type:Schedule
Parameter Sets:Manual, FifteenMins, ThirtyMins, SixtyMins, AsArrive
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SynchronizeRecentlyUsed

Indicates whether the list of email addresses that have been recently used on the device is synchronized.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UseSsl

Indicates whether Secure Sockets Layer (SSL) communication is used when sending emails, receiving emails, and communicating with the Exchange Server.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False