Update-O365AccountName

Update-O365AccountName

Updates the email name for an user account.

Syntax

Parameter Set: Default
Update-O365AccountName [-LocalAccountName] <String> [-NewEmailName] <String> [ <CommonParameters>]

Detailed Description

The Update-O365AccountName cmdlet updates the email name for an user account. The name of an user account is also called a Microsoft online service ID.

Parameters

-LocalAccountName<String>

Specifies the name of a local Active Directory user account. The cmdlet updates the email name for the user account that is assigned to the local user name that you specify.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-NewEmailName<String>

Specifies the new email name for the user account.

Aliases

none

Required?

true

Position?

2

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.

Outputs

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

Examples

Example 1: Update the email name for a user account

This command updates the email name of the account that is assigned to the local user account named PattiFuller.

PS C:\> Update-O365AccountName -LocalAccountName "PattiFuller" -NewEmailName "Patti@Contoso.com"
PS C:\> 

Get-O365User