How should you complete the relevant Windows PowerShell command?

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.

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.

Answer:

Explanation:



Leave a Reply 13

Your email address will not be published. Required fields are marked *


WiFiF

WiFiF

Answer is “-ForceChangePassword $true”

roy

roy

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!

CS Tseng

CS Tseng

Get – MsolUser | Set -MsolUser -StrongPasswordRequired $true

Anna

Anna

-ForceChangePassword
When true, the user will be required to change their password the next time they sign in.

Sara

Sara

This question asks you to reset users’ password. So -NewPassword Pass#123# is correct. -ForceChangePassword sets password randomly.

Vietnam

Vietnam

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.

Anna

Anna

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.

Simon

Simon

I would go for:
Set-MsolUserPassword -ForceChangePassword $True

Simon

Simon

oh, I would go for:
Set-MsolUserPassword -NewPassword Pass#123# -ForceChangePassword $True

Dummy

Dummy

Answer should be Set-MsolUserPassword -ForceChangePassword $True The user will get a random password and forced to change it.

Tijs bouwmans

Tijs bouwmans

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.

Kai

Kai

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