Add-HostedEmailAccount
Add-HostedEmailAccount
Creates a hosted email account and assigns it to a network user account.
Sintaxis
Parameter Set: Default
Add-HostedEmailAccount [-LocalAccountName] <String> [-EmailAddress] <String> [[-Password] <SecureString> ] [ <CommonParameters>]
Descripción detallada
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.
Parámetros
-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.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
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.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
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
.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
3 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
System.String,System.String,System.Security.SecureString
LocalAccountName
Type: System.String
Description: local user nameEmailAddress
Type: System.String
Description: email address accountPassword
Type: System.Security.SecureString
Description: password for the email account
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Ejemplos
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