PrepAway - Latest Free Exam Questions & Answers

Which Windows PowerShell command should you run next?

You are the Office 365 administrator for your company. The company uses Microsoft Exchange
Online and Microsoft Lync Online.
An employee named User1 has the user name, email address, and Lync address
User1@contoso.com.
The employee requests that you change only his Lync address to User1-Sales@contoso.com.
You start a Windows PowerShell session and run the following commands, providing your admin
account credentials when prompted:

You need to complete the process of updating the employee’s Lync address without affecting any
other addresses.
Which Windows PowerShell command should you run next?

PrepAway - Latest Free Exam Questions & Answers

A.
Set-MsolUser -UserPrincipalName $ID -ProxyAddresses@{add = “$NewAddress”; remove =
“$OldAddress”>

B.
Set-Mailbox -Identity $ID -EmailAddresses@{add = “$NewAddress”; remove = “$Old Address”}

C.
Set-Mailbox -Identity $ID -WindowsEmailAddress $NewAddress

D.
Set-CsUser -Identity $ID -ProxyAddresses@{add = M$NewAddress”; remove=”$OldAddress”>

Explanation:

11 Comments on “Which Windows PowerShell command should you run next?

  1. Massimo says:

    B is correct, but the whole process is completely crazy. In order to change the SIP URI for Lync Online, you are editing low-level attributes *on the Exchange Online mailbox*, bypassing Office 365 altogether and not even touching Lync Online itself.




    1



    0
  2. Dave says:

    Fortunately, SIP addresses are not written in stone; after all, you can easily change the SIP address by running the Set-CsUser cmdlet: Set-CsUser –Identity “Ken Myer” –SipAddress “sip:kenmyer@litwareinc.com”

    https://blogs.technet.microsoft.com/nexthop/2011/03/21/modify-the-sip-address-of-an-enabled-lync-server-user/

    Which is correct for on-premise, however:

    https://support.microsoft.com/en-gb/help/2909916/skype-for-business-online-admins-can-t-use-the-set-csuser-cmdlet-in-sk

    “AudioVideoDisabled is the only parameter that you can use together with the Set-CsUser cmdlet in Skype for Business Online”

    So: https://gallery.technet.microsoft.com/office/PowerShell-function-to-set-b4f25dac

    Uses:

    $SIPToRemove = $CurrentSIPObject.ProxyAddressString
    [String]$MessageText = [String]$MessageText = “SIP address {0} is incorrect and will be deleted” f $CurrentSIPAddressString
    Write-Verbose -Message $MessageText
    set-mailbox -Identity $CurrentMailbox.Alias -EmailAddresses @{ remove = $SIPToRemove } -ErrorAction Continue

    So essentially, B is correct 🙂




    0



    0
  3. Dave says:

    Oops, wrong paste:

    [String]$SIPToAdd = “SIP:{0}” -f $CurrentMailbox.PrimarySMTPAddress

    set-mailbox -Identity $CurrentMailbox.Alias -EmailAddresses @{ add = $SIPToAdd } -ErrorAction Continue

    [String]$MessageText = “SIP address {0} was set on mailbox {1}” -f $SIPToAdd, $CurrentMailbox.Alias




    0



    0

Leave a Reply