AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added PowerShell V5 example for listing policy versions

Security assessment

Documents policy version inspection which is important for security audits, but doesn't address specific vulnerabilities. Helps track policy change history.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_ListPolicyVersions_section.md b/code-library/latest/ug/iam_example_iam_ListPolicyVersions_section.md
index 8df2f1c70..cda5ae6ac 100644
--- a//code-library/latest/ug/iam_example_iam_ListPolicyVersions_section.md
+++ b//code-library/latest/ug/iam_example_iam_ListPolicyVersions_section.md
@@ -85,0 +86,22 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example returns the list of available versions of the policy whose ARN is`arn:aws:iam::123456789012:policy/MyManagedPolicy`. To get the policy document for a specific version, use the `Get-IAMPolicyVersion` command and specify the `VersionId` of the one you want.**
+    
+    
+    Get-IAMPolicyVersionList -PolicyArn arn:aws:iam::123456789012:policy/MyManagedPolicy
+    
+
+**Output:**
+    
+    
+    CreateDate                   Document                 IsDefaultVersion                  VersionId
+    ----------                   --------                 ----------------                  ---------
+    2/12/2015 9:39:53 AM                                  True                              v2
+    2/12/2015 9:39:09 AM                                  False                             v1
+
+  * For API details, see [ListPolicyVersions](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+