AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added PowerShell V5 example for retrieving server certificate details

Security assessment

Documents certificate inspection which is security-related, but no vulnerability addressed

Diff

diff --git a/code-library/latest/ug/iam_example_iam_GetServerCertificate_section.md b/code-library/latest/ug/iam_example_iam_GetServerCertificate_section.md
index b72e546a8..75ba7d062 100644
--- a//code-library/latest/ug/iam_example_iam_GetServerCertificate_section.md
+++ b//code-library/latest/ug/iam_example_iam_GetServerCertificate_section.md
@@ -260,0 +261,51 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example retrieves details about the server certificate named`MyServerCertificate`. You can find the certificate details in the `CertificateBody` and `ServerCertificateMetadata` properties.**
+    
+    
+    $result = Get-IAMServerCertificate -ServerCertificateName MyServerCertificate
+    $result | format-list
+    
+
+**Output:**
+    
+    
+    CertificateBody           : -----BEGIN CERTIFICATE-----
+                                MIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMC
+                                VVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6
+                                b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAd
+                                BgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhcNMTEwNDI1MjA0NTIxWhcN
+                                MTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYD
+                                VQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25z
+                                b2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFt
+                                YXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ
+                                21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9T
+                                rDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY6786m86gpE
+                                Ibb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4
+                                nUhVVxYUntneD9+h8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0Fkb
+                                FFBjvSfpJIlJ00zbhNYS5f6GuoEDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTb
+                                NYiytVbZPQUQ5Yaxu2jXnimvw3rrszlaEXAMPLE=
+                                -----END CERTIFICATE-----
+    CertificateChain          : 
+    ServerCertificateMetadata : Amazon.IdentityManagement.Model.ServerCertificateMetadata
+    
+    
+    $result.ServerCertificateMetadata
+    
+
+**Output:**
+    
+    
+    Arn                   : arn:aws:iam::123456789012:server-certificate/Org1/Org2/MyServerCertificate
+    Expiration            : 1/14/2018 9:52:36 AM
+    Path                  : /Org1/Org2/
+    ServerCertificateId   : ASCAJIFEXAMPLE17HQZYW
+    ServerCertificateName : MyServerCertificate
+    UploadDate            : 4/21/2015 11:14:16 AM
+
+  * For API details, see [GetServerCertificate](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+