Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save materro/3c2ceb4d940160af6c9a88d2cb266e98 to your computer and use it in GitHub Desktop.

Select an option

Save materro/3c2ceb4d940160af6c9a88d2cb266e98 to your computer and use it in GitHub Desktop.
Reset strong authentication methods using powershell module MSOnline
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