Add-HostedEmailAccount

Add-HostedEmailAccount

Creates a hosted email account and assigns it to a network user account.

構文

Parameter Set: Default
Add-HostedEmailAccount [-LocalAccountName] <String> [-EmailAddress] <String> [[-Password] <SecureString> ] [ <CommonParameters>]

詳細説明

The Add-HostedEmailAccount cmdlet creates a hosted email account and assigns it to a local user account. A hosted email service provides a hosted email account.

パラメーター

-EmailAddress<String>

Specifies an email address for a hosted email account. The cmdlet creates a hosted email account that has the email address that you specify.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-Password<SecureString>

Specifies the password, as a secure string, for the hosted email account. To obtain a secure string, use the ConvertTo-SecureString cmdlet. For more information, type Get-Help ConvertTo-SecureString.

エイリアス

なし

必須?

false

位置は?

3

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • System.String,System.String,System.Security.SecureString

    LocalAccountName
    Type: System.String
    Description: local user name

    EmailAddress
    Type: System.String
    Description: email address account

    Password
    Type: System.Security.SecureString
    Description: password for the email account

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Create a hosted email account

The first command creates a secure string password.

The second command creates a hosted email account named PattiFuller@Constoso.com and assigns it to a local user account named PattiFuller, using the password created in the previous command.

PS C:\> $SecureString_pwd = convertto-securestring "P@ssW0rD!" -Asplaintext -Force
PS C:\> Add-HostedEmailAccount -LocalAccountName "PattiFuller" -EmailAddresses "PattiFuller@Constoso.com" -Password $SecureString_pwd

関連トピック

Get-HostedEmailAccount

Set-HostedEmailAccount

Enable-HostedEmailAccount

Disable-HostedEmailAccount

Remove-HostedEmailAccount

Clear-AssignedHostedEmailAccount