Forum Discussion

Marvin Oco's avatar
Marvin Oco
Steel Contributor
Aug 13, 2020

MFA - Enable via Powershell

_____________________________

 

existing script:

 

$auth.RelyingParty = "*"

$auth.State = "Enforced"

$auth.RememberDevicesNotIssuedBefore = (Get-Date)


Import-Csv C:\CSV\MFA_Enabled.csv | Get-MsolUser | Foreach{ Set-MsolUser -UserPrincipalName $_.UserPrincipalName -StrongAuthenticationRequirements $auth}

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

if we use “Enable” in the $auth.State, can this script be enhanced  to include checkpoint/verification if the current state is already “Enforced” then provide prompt or even skip that particular user?

No RepliesBe the first to reply

Resources