Which Windows PowerShell cmdlet should you run?

You are the Office 365 administrator for your company. A user named User1 from a partner organization is permitted to sign in and use the Office 365 services.
User1 reports that the password expires in ten days. You must set the password to never expire. Changes must NOT impact any other accounts.
You need to update the password policy for the user.
Which Windows PowerShell cmdlet should you run?

You are the Office 365 administrator for your company. A user named User1 from a partner organization is permitted to sign in and use the Office 365 services.
User1 reports that the password expires in ten days. You must set the password to never expire. Changes must NOT impact any other accounts.
You need to update the password policy for the user.
Which Windows PowerShell cmdlet should you run?

A.
Set-MsolPasswordPolicy

B.
Set-MsolPartnerlnformation

C.
Set-MsolUser

D.
Set-MsolUserPassword

Explanation:

https://msdn.microsoft.com/en-us/library/azure/dn194136.aspx



Leave a Reply 5

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


EricB

EricB

BS. Even the explanation link, in the very first paragraph, points to Set-MsolUserPassword as the better choice. The command would be:

Set-MsolUserPassword -UserPrincipalName [email protected] -PasswordNeverExpires $true

Eric

Eric

Of course the username is after -UserPrincipalName

Jerry

Jerry

C is correct as there is no -PasswordNeverExpires in set-MsoluserPassword command

SYNTAX
Set-MsolUserPassword -ObjectId [-ForceChangePassword ] [-NewPassword ] [-TenantId ] []

Set-MsolUserPassword -UserPrincipalName [-ForceChangePassword ] [-NewPassword ] [-TenantId ] []

DESCRIPTION
The Set-MsolUserPassword cmdlet is used to change the password of a user. This cmdlet can only be used for users with standard identities.