How do I get powershell to return all users with MFA turned off?
I'm rather new to powershell scripting and seem to be having issues getting powershell to return a list of all users within a particular group that have MFA turned off. I plan on having the output put into a .csv file later. This is what I've cobbled together sofar:
Connect-MsolService
$GroupA = <Group ID>
$Path = <File Path>
Get-MsolGroupMember -GroupObjectId $GroupA | Get-MsolUser | ?
{$_.StrongAuthenticationMethods -ne $null} | Sort DisplayName
However some of the users in the list it returns have MFA turned on. I'd appreciate any help. Thank you.
from Recent Questions - Stack Overflow https://ift.tt/3q4t6j0
https://ift.tt/eA8V8J
Comments
Post a Comment