Set-HostedEmailAccount

Set-HostedEmailAccount

Assigns a hosted email account to a network user account.

Syntax

Parameter Set: Default
Set-HostedEmailAccount [-LocalAccountName] <String> [-EmailAccount] <EmailAccountInfo> [ <CommonParameters>]

Detailed Description

The Set-HostedEmailAccount cmdlet assigns a hosted email account to a local user account. A hosted email service provides a hosted email account.

Parameters

-EmailAccount<EmailAccountInfo>

Specifies the email account information that the hosted email service provides.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-LocalAccountName<String>

Specifies the name of a local Active Directory user account. The cmdlet assigns the hosted email account to the local user account that you specify.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.String,Microsoft.WindowsServerSolutions.HostedEmail.EmailAccountInfo

    LocalAccountName
    Type: System.String
    Description: local user name

    EmailAccount
    Type: Microsoft.WindowsServerSolutions.HostedEmail.EmailAccountInfo
    Description: email account information
    AccountId Property System.String
    AdditionalEmailAddresses Property System.Collections.Generic.IList<System.String>
    DisplayNameProperty System.String
    Enabled Property System.Boolean
    ExtendedProperties Property System.Collections.Generic.IDictionary<System.String,System.String>
    FirstName Property System.String
    LastName Property System.String
    PrimaryEmailAddress Property System.String

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Assign a hosted email account to a local user account

This command assigns the hosted email account named PattiFuller@Constoso.com to the local user account named PattiFuller.

PS C:\> Set-HostedEmailAccount -LocalAccountName "PattiFuller" -EmailAccount "PattiFuller@Constoso.com"

Get-HostedEmailAccount

Add-HostedEmailAccount

Enable-HostedEmailAccount

Disable-HostedEmailAccount

Remove-HostedEmailAccount

Clear-AssignedHostedEmailAccount