Script consultar MFA 0365

Scripts para sacar el MFA de las cuentas de 365

Dos Fases

1 Sacar listado

Connect-MsolService

#

Get-MsolUser -All | Select-Object @{N=’UserPrincipalName’;E={$_.UserPrincipalName}},

@{N=’MFA Status’;E={if ($_.StrongAuthenticationRequirements.State){$_.StrongAuthenticationRequirements.State} else {“Disabled”}}},

@{N=’MFA Methods’;E={$_.StrongAuthenticationMethods.methodtype}} | Export-Csv -Path c:\MFA_Report.csv -NoTypeInformation

#

Analizar usuarios activos

$usernamel =( )
)

foreach($username in $usernamel){

Get-MsolUser -UserPrincipalName $username | Where-Object {$_.BlockCredential -eq $false} | Select-Object UserPrincipalName, BlockCredential

}

saludos

Leave a Reply

Your email address will not be published.