AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added PowerShell V5 examples for detaching group policies

Security assessment

Routine documentation update showing policy management operations. No specific security vulnerability addressed, though proper policy management is a security best practice.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_DetachGroupPolicy_section.md b/code-library/latest/ug/iam_example_iam_DetachGroupPolicy_section.md
index 0840ba856..ce447330e 100644
--- a//code-library/latest/ug/iam_example_iam_DetachGroupPolicy_section.md
+++ b//code-library/latest/ug/iam_example_iam_DetachGroupPolicy_section.md
@@ -58,0 +59,20 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example detaches the managed group policy whose ARN is`arn:aws:iam::123456789012:policy/TesterAccessPolicy` from the group named `Testers`.**
+    
+    
+    Unregister-IAMGroupPolicy -GroupName Testers -PolicyArn arn:aws:iam::123456789012:policy/TesterAccessPolicy
+    
+
+**Example 2: This example finds all the managed policies that are attached to the group named`Testers` and detaches them from the group.**
+    
+    
+    Get-IAMAttachedGroupPolicies -GroupName Testers | Unregister-IAMGroupPolicy -Groupname Testers
+    
+
+  * For API details, see [DetachGroupPolicy](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+