Set-EaiMailAddressesForUsers

Module: Exchange_AddIn
Applies to: Exchange online and Exchange Server on premises.

Set-EaiMailAddressesForUsers

SYNOPSIS

Sets E-Mail addresses for a defined list of users, using a set list of values.

SYNTAX

Set-EaiMailAddressesForUsers [[-InputFile] <Object>] [[-MailObjectType] <Object>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

This fuction uses a CSV import file to add an SMTP address to users and sets the new one as the primary.
This allows a defined scope of users to only add the new value as needed.
The CSV file must have two (2) columns: alias,addnewemailaddress
Bu defining the alias and the needed new email address, it allows a specific value and set of users to only need to be updated.

EXAMPLES

EXAMPLE 1

Set-EAEMailAddressesForUsers -InputFile c:\temp\AddSmtpMakePrimaryProxy.csv

Imports the file of c:\temp\AddSmtpMakePrimaryProxy.csv, and then sets the values listed in file.

EXAMPLE 2

Set-EAEMailAddressesForUsers -InputFile c:\names\AddSmtpPrimary.csv -verbose

Imports the file of c:\names\AddSmtpPrimary.csv, shows verbose content, and then sets the values listed in file.

EXAMPLE 3

Set-EAEMailAddressesForUsers -InputFile c:\temp\AddSmtpMakePrimaryProxy.csv -WhatIf

Imports the file of c:\temp\AddSmtpMakePrimaryProxy.csv and only runs in WhatIf mode with not setting any values to any aliases.

PARAMETERS

-InputFile

Enter computer name to run function againist.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: C:\temp\AddSmtpMakePrimaryProxy.csv
Accept pipeline input: False
Accept wildcard characters: False

-MailObjectType

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

CSV file is required. Needs 2 columns: alias and the new email address requested.

Ensure the CSV file is NOT opened when trying to import into this function to run updates for users.

OUTPUTS

Screen output of updated aliases

NOTES

Built March 28, 2020 for specific add of e-mail new address and set as primary.
Additional options may be built in later if needed.

RELATED LINKS