Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Specifies an email address for a hosted email account. The cmdlet creates a hosted email account that has the email address that you specify.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
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 |
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
.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
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).
The input type is the type of the objects that you can pipe to the 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
The output type is the type of the objects that the cmdlet emits.
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