New-​CM​Email​Profile

Creates an email profile.

Syntax

New-CMEmailProfile
   [-AccountDomainActiveDirectory <String>]
   [-AccountDomainCustom <String>]
   -AccountName <String>
   [-AccountUserNameType <String>]
   [-AllowMessageMove]
   [-AllowThirdPartyApplication]
   [-Confirm]
   [-Description <String>]
   [-DisableWildcardHandling]
   [-DoNotUseSsl]
   [-EmailAddressType <String>]
   [-EnableSmime]
   -ExchangeHost <String>
   [-ForceWildcardHandling]
   [-IdentityCertificate <IResultObject>]
   [-MailSyncDays <MailNumberofDaysToSync>]
   -Name <String>
   [-SigningCertificate <IResultObject>]
   -SupportedPlatform <IResultObject[]>
   [-SyncContentType <EasProfileSyncContentType>]
   [-SyncSchedule <Schedule>]
   [-SynchronizeRecentlyUsed]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-CMEmailProfile cmdlet creates an Exchange ActiveSync email profile.

Examples

Example 1: Create an email profile

PS C:\> $Platform = Get-CMSupportedPlatform -Fast -Platform "Windows Phone"
PS C:\> New-CMEmailProfile -AccountName "TestAccount1" -ExchangeHost "TestHost1" -Name "EmailProfile01" -SupportedPlatform $Platform[1] -AccountUserNameType sAMAccountName -AccountDomainActiveDirectory domain

The first command gets all supported platform objects for Windows Phone and stores the objects in the $Platform variable.

The second command creates an email named EmailProfile01 using the second supported platform object from $Platform.

Required Parameters

-AccountName

Specifies the display name for the email account.

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

Specifies the hostname of the Exchange server that hosts Exchange ActiveSync services.

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

Specifies a name for the Exchange ActiveSync email profile.

Type:String
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
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
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AllowMessageMove

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

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

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

Type:SwitchParameter
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

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

Type:SwitchParameter
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableSmime

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

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

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
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
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
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
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SynchronizeRecentlyUsed

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

Type:SwitchParameter
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IResultObject#SMS_ConfigurationPolicy