PrepAway - Latest Free Exam Questions & Answers

How should you complete the relevant Windows PowerShell command?

DRAG DROP
You are the Office 365 administrator for your company. Your company uses Office 365 for collaboration.
You must reset the password for all of the employees in your company.
You need to ensure that all employees create a new password the next time they sign in to Office 365.
How should you complete the relevant Windows PowerShell command? To answer, drag the
appropriate Windows PowerShell segment to the correct location or locations. Each Windows
PowerShell segment may be used once, more than once, or not at all. You may need to drag the split bar
between panes or scroll to view content.

PrepAway - Latest Free Exam Questions & Answers

Answer: See the explanation

Explanation:
Set-MsolUserPassword
-ForceChangePassword $true
this is the only combination that fulfills both requirements (reset the password and force the user to
change it at next login)
the -NewPassword parameter is not required to reset the password. if this is omitted, O365 generates a
random password.
the -ForceChangePassword parameter must be $true if you want the user to reset their password at next
login.
https://msdn.microsoft.com/en-us/library/dn194140.aspx

12 Comments on “How should you complete the relevant Windows PowerShell command?

  1. João Silva says:

    Wrong. The -NewPassword option also requires the user to reset the password in the next login.

    “This command resets the password for davidchew@contoso.com. The user will be required to reset the password on next sign in.” – https://docs.microsoft.com/en-us/powershell/msonline/v1/Set-MsolUserPassword?redirectedfrom=msdn

    Regarding that we must assume the answer with less administrative impact, the new password will require less, because it is the same password, not requiring that the administrator communicates a different password for each user.




    0



    0
    1. João Silva says:

      get-msoluser | Set-MsolUserPassword -ForceChangePassword $true
      Taqa9920
      Yaso5279
      Loxa5202
      Data4800
      Xuza4718
      Mobu8712
      Voja5266
      Jopu8126
      Dodu9064
      Kosa6032
      Dozo5103
      Kacu0513
      Cova0730
      Buba5347
      Wota4765
      Kuku9637
      Lupu1394
      Faga8737
      Qoja3548
      Puku4663
      Saho5091
      Tadu1949
      Sazo2899
      Gaku2742
      Ruku0040
      Quga2619
      Loyu5792
      Hucu0712
      Juno3593
      Koco9197
      Tanu8568
      Lozo6973

      get-msoluser | Set-MsolUserPassword -NewPassword pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1
      pass@word1




      1



      0
  2. Alison says:

    Also it says you must reset the password for all of the employees in your company and require them to change it on next login. If you just use -ForceChangePassword $true then you are not resetting the password but only doing the requiring them to change it bit.
    So it’s get-msoluser | Set-MsolUserPassword -NewPassword pass@word1 as stated by João Silva




    0



    0
  3. Vietnam says:

    Actually you are changing the password. If you do not specify any parameter, it will auto generate password.

    By default the -ForceChangePassword is set to $true so you could use only Set-msoluserpassword without any additional parameters, and get list of passwords, which then you´d have to distribute etc. So -newpassword parameter is correct as all users will have to change to a new password anyways.




    0



    0
  4. WallkerPF says:

    True. The -ForceChangePassword $True will change the user password immediately. This new password is a OneTime password, so the user has to change it when he logs in after this command is executed.
    This is the right answer.




    0



    0
      1. NR says:

        Actually if you read Example 1 (using the ForceChangePassword parameter) and Example 2 (using the NewPassword parameter) on the supplied link, it says loud and clear that both reset the password and force the user to change their password at next logon. Thus both these answers are valid solutions. This question is malformed.




        0



        0
  5. Xavier says:

    Using the following command will reset a user’s password with a pre-defined password and not require the user to change the password:

    Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName –NewPassword -ForceChangePassword $False

    This command will set a temporary password and force a user to change their password at next log on:

    Set-MsolUserPassword –UserPrincipalName –NewPassword -ForceChangePassword $True

    It appears the ‘ForceChangePassword $True’ parameter is needed to force a user to change the password otherwise they can continue to use the password assigned when it was changed.




    0



    0
  6. dy2210 says:

    Set-MsolUserPassword -UserPrincipalName “davidchew@contoso.com” -ForceChangePassword $true

    Set-MsolUserPassword -UserPrincipalName “davidchew@consoso.com” -NewPassword “pa$$word”

    Since-NewPassword needs double quotes, the answer is correct.




    0



    0

Leave a Reply