AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added PowerShell V5 example for generating and retrieving IAM credential reports

Security assessment

Documents credential auditing features but does not indicate remediation of a security flaw. Credential reports are security tools but this is routine documentation.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_GetCredentialReport_section.md b/code-library/latest/ug/iam_example_iam_GetCredentialReport_section.md
index 4422e6c1f..077bb20a0 100644
--- a//code-library/latest/ug/iam_example_iam_GetCredentialReport_section.md
+++ b//code-library/latest/ug/iam_example_iam_GetCredentialReport_section.md
@@ -81,0 +82,32 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example opens the returned report and outputs it to the pipeline as an array of text lines. The first line is the header with comma-separated column names. Each successive row is the detail row for one user, with each field separated by commas. Before you can view the report, you must generate it with the`Request-IAMCredentialReport` cmdlet. To retrieve the report as a single string, use `-Raw` instead of `-AsTextArray`. The alias `-SplitLines` is also accepted for the `-AsTextArray` switch. For the full list of columns in the output consult the service API reference. Note that if you do not use `-AsTextArray` or `-SplitLines`, then you must extract the text from the `.Content` property using the .NET `StreamReader` class.**
+    
+    
+    Request-IAMCredentialReport
+    
+
+**Output:**
+    
+    
+    Description                                                         State
+    -----------                                                         -----
+    No report exists. Starting a new report generation task             STARTED
+    
+    
+    Get-IAMCredentialReport -AsTextArray
+    
+
+**Output:**
+    
+    
+          user,arn,user_creation_time,password_enabled,password_last_used,password_last_changed,password_next_rotation,mfa_active,access_key_1_active,access_key_1_last_rotated,access_key_2_active,access_key_2_last_rotated,cert_1_active,cert_1_last_rotated,cert_2_active,cert_2_last_rotated root_account,arn:aws:iam::123456789012:root,2014-10-15T16:31:25+00:00,not_supported,2015-04-20T17:41:10+00:00,not_supported,not_supported,true,false,N/A,false,N/A,false,N/A,false,N/A
+    Administrator,arn:aws:iam::123456789012:user/Administrator,2014-10-16T16:03:09+00:00,true,2015-04-20T15:18:32+00:00,2014-10-16T16:06:00+00:00,N/A,false,true,2014-12-03T18:53:41+00:00,true,2015-03-25T20:38:14+00:00,false,N/A,false,N/A
+    Bill,arn:aws:iam::123456789012:user/Bill,2015-04-15T18:27:44+00:00,false,N/A,N/A,N/A,false,false,N/A,false,N/A,false,2015-04-20T20:00:12+00:00,false,N/A
+
+  * For API details, see [GetCredentialReport](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+