DRAG DROP
A company has 50 employees that use Office 365.
You need to enforce password complexity requirements for all accounts.
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.
Explanation:
Answer is “-ForceChangePassword $true”
Nope..its correct, you must reset the password, when resetting password with new value you have to give in a new password. No extra command required!
Get – MsolUser | Set -MsolUser -StrongPasswordRequired $true
-ForceChangePassword
When true, the user will be required to change their password the next time they sign in.
This question asks you to reset users’ password. So -NewPassword Pass#123# is correct. -ForceChangePassword sets password randomly.
Sara – not true:
Set-msoluserpassword sets password randomly but by default users are required t change password. Only if you want to prevent them from that you need to specify -Forcechangepassword $false. if you do not specify anything, it will force the change.
https://msdn.microsoft.com/en-us/library/dn194140.aspx
-ForceChangePassword
When true, the user will be required to change their password the next
time they sign in.
Required? false
Position? named
Default value
-NewPassword
The new password for the user.
If this value is omitted, then a random password will be assigned to
the user.
Required? false
Position? named
Default value
So there is a choice. If you set new password to Pass#123# there will be no change password next logon. If you specify ForceChangePassword a random password will be generated for every useer and required change next logon.
“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.”
Seems logical to me.
I would go for:
Set-MsolUserPassword -ForceChangePassword $True
oh, I would go for:
Set-MsolUserPassword -NewPassword Pass#123# -ForceChangePassword $True
Answer should be Set-MsolUserPassword -ForceChangePassword $True The user will get a random password and forced to change it.
I think it should be Set-MsolUserPassword -NewPassword Pass#123#
Set-MsolUserPassword –UserPrincipalName “userprincipalname” –NewPassword “newpassword”
Note: If you omit the –NewPassword switch, then it is considered a password reset rather than a password change; in this case, the user will receive a random password, and they must change it themselves at the next sign-in attempt.
The questions specifically states you must reset the passwords rather than to let the users change them.
Thus the -ForceChangePassword $True isn’t the right option.
https://msdn.microsoft.com/en-us/library/azure/dn194140(v=azure.98).aspx
Example 2
This command resets the password for [email protected]. The user will be required to reset the password on next sign in.
Set-MsolUserPassword -userPrincipalName [email protected] -NewPassword Nula8787
Hello together,
this command resets the password for [email protected]. The cmdlet generates a random password. The user is required to reset the password on next sign in.
PS C:\> Set-MsolUserPassword -UserPrincipalName “[email protected]” -ForceChangePassword
This command resets the password for [email protected]. The user will be required to reset the password on next sign in.
PS C:\> Set-MsolUserPassword -UserPrincipalName “[email protected]” -NewPassword “pa$$word”
https://docs.microsoft.com/en-us/powershell/msonline/v1/set-msoluserpassword