AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2025-06-28 · Documentation low

File: code-library/latest/ug/iam_example_iam_DeactivateMfaDevice_section.md

Summary

Added PowerShell V5 examples for disabling MFA devices

Security assessment

Documents MFA management which is security-related, but focuses on standard operational procedures rather than addressing vulnerabilities.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_DeactivateMfaDevice_section.md b/code-library/latest/ug/iam_example_iam_DeactivateMfaDevice_section.md
index 291daae87..fb48bdbf6 100644
--- a//code-library/latest/ug/iam_example_iam_DeactivateMfaDevice_section.md
+++ b//code-library/latest/ug/iam_example_iam_DeactivateMfaDevice_section.md
@@ -58,0 +59,20 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This command disables the hardware MFA device associated with the user`Bob` that has the serial number `123456789012`.**
+    
+    
+    Disable-IAMMFADevice -UserName "Bob" -SerialNumber "123456789012"
+    
+
+**Example 2: This command disables the virtual MFA device associated with the user`David` that has the ARN `arn:aws:iam::210987654321:mfa/David`. Note that virtual MFA device is not deleted from the account. The virtual device is still present and appears in the output of the `Get-IAMVirtualMFADevice` command. Before you can create a new virtual MFA device for the same user, you must delete the old one by using the `Remove-IAMVirtualMFADevice` command.**
+    
+    
+    Disable-IAMMFADevice -UserName "David" -SerialNumber "arn:aws:iam::210987654321:mfa/David"
+    
+
+  * For API details, see [DeactivateMfaDevice](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+