ProLiant Servers (ML,DL,SL)
1767188 Members
4130 Online
108959 Solutions
New Discussion

Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

 
SOLVED
Go to solution
tab405
Occasional Contributor

Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

Prolient DL360 Gen 10 Plus (ESXi 7.0.3) - But this is really about ilo and powershell

I can't get the CMDLet to get - show the actual ValidNotAfter / ValidNotBefore dates of the iLO SSL certificates - they are internal MS Certificate Authority signed - and show valid.

========= Code =========

$connection = Connect-HPEiLO 10.2.29.161 -Username USERTEMP  (Password is prompted for)
$out = ,$connection | Get-HPEiLOSSLCertificateInfo | select *
$out

=========Result ======== (Dates are the question - on iLO all fileds have valid real time values)

Issuer :
SerialNumber :
Subject :
ValidNotAfter : 1/1/0001 12:00:00 AM
ValidNotBefore : 1/1/0001 12:00:00 AM
IP : 10.2.X.X
Hostname : esxi07.alz-chicago.alz.org
Status : OK
StatusInfo :

------------ PSVersion Info ----------------------- 


PSVersion 5.1.19041.2673
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.2673
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

---------PS Module Versions----------------------------- 

HPEiLOCmdlets 3.0.0.0 Binary
HPEiLOCmdlets 3.3.0.0 Binary
ISE 1.0.0.0 Script
Microsoft.PowerShell.Management 3.1.0.0 Manifest
Microsoft.PowerShell.Security 3.0.0.0 Manifest
Microsoft.PowerShell.Utility 3.1.0.0 Manifest
Microsoft.WSMan.Management 3.0.0.0 Manifest
PackageManagement 1.4.8.1 Script
PKI 1.0.0.0 Manifest
PowerShellGet 2.2.5 Script
VMware.Vim 6.7.0.13964812 Script
VMware.VimAutomation.Cis.Core 11.3.0.13964830 Script
VMware.VimAutomation.Common 11.3.0.13964816 Script
vmware.vimautomation.core 11.3.0.13964826 Script
VMware.VimAutomation.Sdk 11.3.0.13964823 Script

 

 

7 REPLIES 7
TVVJ
HPE Pro

Re: Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

Hello,

Here is a previous post on this subject, which you may review and see if it is of any help.

Regards,

I work for HPE
Views expressed herein are my personal opinion and are not the views of HPE

Accept or Kudo

tab405
Occasional Contributor

Re: Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

Thank you but I tried that - "RawResponse" also does not have the dates

URL: https: // 10.2.x.x/redfish/v1/Managers/1/SecurityService/Https Cert/?$select=X509CertificateInformation.Issuer,X509Ce
rtificateInformation.SerialNumber,X509CertificateInformation.Subject,X509CertificateInformation.ValidNotAfter,X509Certific
ateInformation.ValidNotBefore
ContentType: application/json
Response: {"@odata.context":"/redfish/v1/$metadata#HpeHttps Cert.HpeHttps Cert","@odata.etag":"W/\"C7C9AC66\"","@odata.id":"
/redfish/v1/Managers/1/SecurityService/Https Cert/","@odata.type":"#HpeHttpsCert.v2_0_0.HpeHttps Cert"}

================================= 

 SSL - Certificate Infirmation via iLO gives the following  - These are the dates I need from the PS Script.

Issued To C = US, ST = Illinois, L = Chicago, O = Home Office, OU = IT, CN = iloServername.domain.org

Issued By DC = org, DC = alz, DC = HoeOffice, CN = HomeOffice-MSCERTAUTH--CA

Valid From Mar 22 17:46:29 2023 GMT

Valid Until Oct 2 20:51:39 2024 GMT

Serial Number Confidential info erased

Vinky_99
Esteemed Contributor

Re: Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

As per the information you provided, it seems that the '   Get-HPEiLOSSLCertificateInfo  ' cmdlet is not returning the correct dates for the iLO SSL certificates. Here are a few things you can try to troubleshoot it:

  1. Verify that the iLO SSL certificate is valid and has not expired. You can do this by logging in to the iLO web interface and checking the certificate details.

  2. Check if the '   Get-HPEiLOSSLCertificateInfo   ' cmdlet is up to date. You can do this by running the following command: Get-Module HPEiLOCmdlets -ListAvailable

  3. Try updating the HPEiLOCmdlets module to the latest version. You can do this by running the following command: '   Update-Module HPEiLOCmdlets  '

  4. If updating the module does not work, try using a different cmdlet to retrieve the certificate information. For example, you can use the following command to retrieve the certificate information: '   Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Subject -match "iLO"} | Select-Object -Property *  '

This command retrieves all certificates in the local computer's personal store with a subject that matches "iLO" and displays all properties of the certificate.

I hope this helps you troubleshoot the issue.

These are my opinions so use it at your own risk.
tab405
Occasional Contributor

Re: Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

Thank you for the response

1. Certificate verified

2. All Cmdlets updated Get-HPEiLOSSLCertificateInfo

3. HPEiLOCmdlets module updated.

4. I saw this but have not tried it thinking certificate info should be able to grab the dates considering iLO shows that as well as issuer and other cert related info. The " Get-HPEiLOSSLCertificateInfo" Cmdlet misses all that info.

Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Subject -match "iLO"} | Select-Object -Property * '

 

Still would like to know why this commandlet is not grabbing certificate info as it sounds like that is what it was designed to do or if I am doing something incorrectly.

Kashyap02
HPE Pro
Solution

Re: Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

Hi 
I tried the same command to retrieve the certficate info from powershell. It returned me complete details including the correct dates. 

 

PS C:\HPEiLOCmdlets> $out = $connection|Get-HPEiLOSSLCertificateInfo

PS C:\HPEiLOCmdlets> $out


Issuer         : CN = Default Issuer (Do not trust), O = Hewlett Packard Enterprise, OU = ISS, L = Houston, ST = Texas, C = US
SerialNumber   : XX:XX:2b:88:b6:3a:9b:ad
Subject        : CN = ILOXXXXXXXX, O = Hewlett Packard Enterprise, OU = ISS, L = Houston, ST = Texas, C = US
ValidNotAfter  : 8/23/2032 9:46:22 AM
ValidNotBefore : 8/24/2017 9:46:22 AM
IP             : 10.64.175.XXX
Hostname       : ILODL380G10F6U18.BGL1.GLOBAL.TSLABS.XXXXX.NET
Status         : OK
StatusInfo     : 

 

The Cmdlet version on my system is : 3.1.0.1

 

Use the latest version of cmdlets and verify. 

https://support.hpe.com/connect/s/softwaredetails?language=en_US&softwareId=MTX_6fb90370ea1a42608b0ad3cbaf&tab=revisionHistory

I am a HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

Accept or Kudo

tab405
Occasional Contributor

Re: Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

Kashyap02

Thank you - updating the Cmdlets worked.

I downloaded / installed / imported the 3.3.0.0 version - and now certificate information is complete:

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 3.3.0.0 HPEIloCmdlets {Add-HPEiLODirectoryGroup, Add-HPEiLOFederationGroup, Add-HPEiLOInstallationQueueWaitTask, Add-HPEiLOInstallSet...}

 

 

 

Sunitha_Mod
Moderator

Re: Get-HPEiLOSSLCertificateInfo gives dates 1/1/0001 12:00:00 AM

Hello @tab405,

Awesome! 

We are glad to know the problem has been resolved. 

Thanks,
Sunitha G
I'm an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo