Dave Messman
asked on
Powershell command to find 2FA status on Office365
My powershell skills are weak. I'm looking for a command I can use to export the two factor authentication status of each user in my organization.
I'm hoping to get two columns. One column is the mailbox name and the other column is the 2FA status (disabled, enabled, or enforced).
I found this page which talks about a way to get the status for a single user:
http://www.virtualizationadmin.com/kbase/VirtualizationTips/ServerVirtualization/MicrosoftHyper-VR2Tips/InstallationDeployment/how-check-mfa-status-office-365-user.html
But this doesn't work for me when I input a proper UPN:
$ThisUSer = Get-msoluser -UserPrincipalName "UserPrincipalName" | Select-Object -ExpandProperty StrongAuthenticationRequir ements
$ThisUser.State
I'm hoping to get two columns. One column is the mailbox name and the other column is the 2FA status (disabled, enabled, or enforced).
I found this page which talks about a way to get the status for a single user:
http://www.virtualizationadmin.com/kbase/VirtualizationTips/ServerVirtualization/MicrosoftHyper-VR2Tips/InstallationDeployment/how-check-mfa-status-office-365-user.html
But this doesn't work for me when I input a proper UPN:
$ThisUSer = Get-msoluser -UserPrincipalName "UserPrincipalName" | Select-Object -ExpandProperty StrongAuthenticationRequir
$ThisUser.State
ASKER
@DavidJohnson - we're close.
What I'd like is a script that will run through every user in the domain (with no input from me) and output two columns into a CSV file. Column A is username and column B is 2FA status.
That's what I'm hoping to get.
Thanks
What I'd like is a script that will run through every user in the domain (with no input from me) and output two columns into a CSV file. Column A is username and column B is 2FA status.
That's what I'm hoping to get.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was perfect. Exactly what I needed.
Open in new window