PrepAway - Latest Free Exam Questions & Answers

How should you complete the script?

HOTSPOT
You are the Microsoft Exchange Online administrator for Contoso, Ltd. The company has purchased contoso.com for use as an email domain.

You need to add an email address for each employee. You add the new domain into Office 365 and set the domain intention to Exchange Online.
You need to complete a Windows PowerShell script to add email addresses for all employees.
How should you complete the script? To answer, select the correct answer from each list in the answer area.

Hot Area:

therefore creating a new email address for each user (mailbox) and storing it in the $newaddress variable. email addresses and stores the new value in the $mailbox.EmailAddresses variable. addresses in the $mailbox.EmailAddresses variable to be the email addresses for each mailbox based on the mailbox’s alias.

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:

$mailboxes = Get-Mailbox: This will retrieve a list of all mailboxes and store it in the $mailboxes variable.
$newaddress = $mailbox.alias + “@contoso.com” : This will take each mailbox’s alias and append
@contoso.com to it. For example: an alias of Jane.Thomas will become Jane.Thomas@contoso.com . This is
$mailbox.EmailAddresses += $newaddress : This adds the new (@contoso.com) email address to any existing
Set-Mailbox –Identity $mailbox.alias –EmailAddresses $mailbox.EmailAddresses : This cmdlet sets the email


Leave a Reply