Server Management - Systems Insight Manager
cancel
Showing results for 
Search instead for 
Did you mean: 

Manually copy PEM certificate to C:\hp\hpsmh\certs and it disappears when I restart the SMH service

 
Crestj
Occasional Contributor

Manually copy PEM certificate to C:\hp\hpsmh\certs and it disappears when I restart the SMH service

I am trying to add a PEM certificate to the SMH for our SIM Server in a script.

 

In the past I always copied the PEM file into C:\hp\hpsmh\certs and restarted the SMH service and the certificate would appear in the Trusted Management Servers section of the SMH settings.

I am using the Proliantr Service Pack 2012.10.0 and when I copy the PEM file into the certs folder on a Windows 2008 R2 server is is removed when I restart the SMH service.

Has anything changed? Does anyone else have this issue?

 

Is there a supported way to add a Trusted Management Server via a script to SMH?

thanks

Tony

1 REPLY
Chris-CN
Occasional Visitor

Re: Manually copy PEM certificate to C:\hp\hpsmh\certs and it disappears when I restart the SMH serv

Are you renaming the destination file ?

Here's a simple script i use to copy the cert.

The script also restarts the service on the sim server. (optional)

 

##Variables

$name = $env:computername

$source = "c:\hp\sslshare\cert.pem"

$destination = "\\servername.server.com\c$\hp\hpsmh\certs\$name.pem"

#Commands

copy-item $source $destination

$session = New-PSSession-ComputerNameservername.server.com -credential $cred

Invoke-Command -session $session {Restart-Service ysMgmtHp}