Skip to content

Commit 1ea957f

Browse files
authored
Merge pull request #91916 from MicrosoftGuyJFlo/BacklogItem825071
[Azure AD] Authentication - MFA Backlog item script update 825071
2 parents 9ed3019 + 15bb587 commit 1ea957f

File tree

2 files changed

+6
-53
lines changed

2 files changed

+6
-53
lines changed

articles/active-directory/authentication/howto-mfa-getstarted.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: multi-factor-authentication
66
ms.service: active-directory
77
ms.subservice: authentication
88
ms.topic: conceptual
9-
ms.date: 04/01/2019
9+
ms.date: 10/15/2019
1010

1111
ms.author: joflore
1212
author: MicrosoftGuyJFlo
@@ -173,32 +173,6 @@ If your users were enabled using per-user enabled and enforced Azure Multi-Facto
173173
Run this PowerShell in an ISE window or save as a .PS1 file to run locally.
174174

175175
```PowerShell
176-
# Disable MFA for all users, keeping their MFA methods intact
177-
Get-MsolUser -All | Disable-MFA -KeepMethods
178-
179-
# Wrapper to disable MFA with the option to keep the MFA methods (to avoid having to proof-up again later)
180-
function Disable-MFA {
181-
182-
[CmdletBinding()]
183-
param(
184-
[Parameter(ValueFromPipeline=$True)]
185-
$User,
186-
[switch] $KeepMethods
187-
)
188-
189-
Process {
190-
191-
Write-Verbose ("Disabling MFA for user '{0}'" -f $User.UserPrincipalName)
192-
$User | Set-MfaState -State Disabled
193-
194-
if ($KeepMethods) {
195-
# Restore the MFA methods which got cleared when disabling MFA
196-
Set-MsolUser -ObjectId $User.ObjectId `
197-
-StrongAuthenticationMethods $User.StrongAuthenticationMethods
198-
}
199-
}
200-
}
201-
202176
# Sets the MFA requirement state
203177
function Set-MfaState {
204178
@@ -228,6 +202,8 @@ function Set-MfaState {
228202
}
229203
}
230204
205+
# Disable MFA for all users
206+
Get-MsolUser -All | Set-MfaState -State Disabled
231207
```
232208

233209
## Plan Conditional Access policies

articles/active-directory/authentication/howto-mfa-userstates.md

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: multi-factor-authentication
66
ms.service: active-directory
77
ms.subservice: authentication
88
ms.topic: conceptual
9-
ms.date: 01/11/2019
9+
ms.date: 10/15/2019
1010

1111
ms.author: joflore
1212
author: MicrosoftGuyJFlo
@@ -167,31 +167,8 @@ function Set-MfaState {
167167
}
168168
}
169169
170-
# Wrapper to disable MFA with the option to keep the MFA methods (to avoid having to proof-up again later)
171-
function Disable-Mfa {
172-
173-
[CmdletBinding()]
174-
param(
175-
[Parameter(ValueFromPipeline=$True)]
176-
$User,
177-
[switch] $KeepMethods
178-
)
179-
180-
Process {
181-
182-
Write-Verbose ("Disabling MFA for user '{0}'" -f $User.UserPrincipalName)
183-
$User | Set-MfaState -State Disabled
184-
185-
if ($KeepMethods) {
186-
# Restore the MFA methods which got cleared when disabling MFA
187-
Set-MsolUser -ObjectId $User.ObjectId `
188-
-StrongAuthenticationMethods $User.StrongAuthenticationMethods
189-
}
190-
}
191-
}
192-
193-
# Disable MFA for all users, keeping their MFA methods intact
194-
Get-MsolUser -All | Disable-MFA -KeepMethods
170+
# Disable MFA for all users
171+
Get-MsolUser -All | Set-MfaState -State Disabled
195172
```
196173

197174
## Next steps

0 commit comments

Comments
 (0)