AWS IAM documentation change
Summary
Added PowerShell V5 examples for DeleteUserPolicy operation including bulk policy removal
Security assessment
Demonstrates policy deletion procedures but does not remediate vulnerabilities or document security features. Focuses on operational cleanup.
Diff
diff --git a/IAM/latest/UserGuide/iam_example_iam_DeleteUserPolicy_section.md b/IAM/latest/UserGuide/iam_example_iam_DeleteUserPolicy_section.md index fbc64af4a..a6154bffd 100644 --- a//IAM/latest/UserGuide/iam_example_iam_DeleteUserPolicy_section.md +++ b//IAM/latest/UserGuide/iam_example_iam_DeleteUserPolicy_section.md @@ -149,0 +150,21 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example deletes the inline policy named`AccessToEC2Policy` that is embedded in the IAM user named `Bob`.** + + + Remove-IAMUserPolicy -PolicyName AccessToEC2Policy -UserName Bob + + +**Example 2: This example finds all of the inline polices that are embedded in the IAM user named`Theresa` and then deletes them.** + + + $inlinepols = Get-IAMUserPolicies -UserName Theresa + foreach ($pol in $inlinepols) { Remove-IAMUserPolicy -PolicyName $pol -UserName Theresa -Force} + + + * For API details, see [DeleteUserPolicy](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +