Created
November 3, 2023 15:19
-
-
Save materro/3c2ceb4d940160af6c9a88d2cb266e98 to your computer and use it in GitHub Desktop.
Reset strong authentication methods using powershell module MSOnline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Import-Module MSOnline | |
| $securePassword = ConvertTo-SecureString -String $adminPassword -AsPlainText -Force | |
| $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $adminUpn, $securePassword | |
| Connect-MsolService -Credential $cred | |
| Set-MsolUser -UserPrincipalName $userUpn -StrongAuthenticationMethods @() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment