File tree Expand file tree Collapse file tree 2 files changed +6
-53
lines changed
articles/active-directory/authentication Expand file tree Collapse file tree 2 files changed +6
-53
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ services: multi-factor-authentication
6
6
ms.service : active-directory
7
7
ms.subservice : authentication
8
8
ms.topic : conceptual
9
- ms.date : 04/01 /2019
9
+ ms.date : 10/15 /2019
10
10
11
11
ms.author : joflore
12
12
author : MicrosoftGuyJFlo
@@ -173,32 +173,6 @@ If your users were enabled using per-user enabled and enforced Azure Multi-Facto
173
173
Run this PowerShell in an ISE window or save as a .PS1 file to run locally.
174
174
175
175
``` 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
-
202
176
# Sets the MFA requirement state
203
177
function Set-MfaState {
204
178
@@ -228,6 +202,8 @@ function Set-MfaState {
228
202
}
229
203
}
230
204
205
+ # Disable MFA for all users
206
+ Get-MsolUser -All | Set-MfaState -State Disabled
231
207
```
232
208
233
209
## Plan Conditional Access policies
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ services: multi-factor-authentication
6
6
ms.service : active-directory
7
7
ms.subservice : authentication
8
8
ms.topic : conceptual
9
- ms.date : 01/11 /2019
9
+ ms.date : 10/15 /2019
10
10
11
11
ms.author : joflore
12
12
author : MicrosoftGuyJFlo
@@ -167,31 +167,8 @@ function Set-MfaState {
167
167
}
168
168
}
169
169
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
195
172
```
196
173
197
174
## Next steps
You can’t perform that action at this time.
0 commit comments