The messaging operations team has requested a script to simplify the process of changing email addresses.
The script must perform the following actions:
Obtain employee information from a .csv file that has a header line of UserPrincipalName,CurrentPrimaryAddress,NewPrimaryAddress.
Change employees' primary email addresses to the values in the NewPrimaryAddress column.
Retain employees' current email addresses as secondary addresses.
You create the following Windows PowerShell script to read the .csv file. Line numbers are included for reference only.
You need to complete the script to meet the requirements.
Which Windows PowerShell command should you insert at line 06?
A. Set-Mailbox -Identity $UserPrincipalName -WindowsEmailAddress $NewPrimary
B. Set-Mailbox -Identity $UserPrincipalName -PrimarySmtpAddress $NewPrimary
C. Set-Mailbox -Identity $UserPrincipalName -ExternalEmailAddress $NewPrimary
D. Set-MailUser -Identity $UserPrincipalName -EmailAddresses@{add = "SMTP:" + "$NewPrimary"; remove="SMTP:" + "$OldPrimary"}
Answer: D
No comments:
Post a Comment
Note: only a member of this blog may post a comment.