Created
March 6, 2020 18:11
-
-
Save Torxsmind/7261b5c8b339e5214ea4eaf1163d6174 to your computer and use it in GitHub Desktop.
Azure Get MFA Default Method
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 | |
| Connect-MsolService | |
| $now = Get-Date -UFormat "%Y-%m-%d_%H-%M-%S" | |
| $filepath = 'C:\temp\MFA_Users_' + $now + '.csv' | |
| Get-MsolUser -All | Select-Object UserPrincipalName, DisplayName, Title, | |
| @{n="MFA"; e={$_.StrongAuthenticationRequirements.State}}, | |
| @{n="Default Method"; e={($_.StrongAuthenticationMethods | where-object isdefault -eq 'true').MethodType}}, | |
| @{n="Methods"; e={($_.StrongAuthenticationMethods).MethodType}} | Export-Csv -Path $filepath -NoTypeInformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment