Forum Discussion
Jeffrey_Silver1
Oct 02, 2013Nimbostratus
With the assitance of Joe Pruitt, I have been able to figure out what I was having issues with. The goal is to get the clientSSL certs from one F5 into another F5 without doing a full configSync type process. The following code snipped in POWERSHELL gets the .crt and .key content that I am planning on importing into the other LTM using the cerfiticate_import_from_pem and key_import_from_pem methods.
if ( Initialize-F5.iControl -Hostname $name -Username xxxx -Password xxxx ) {
$g_Certs = (Get-F5.iControl).ManagementKeyCertificate
$ocrt = ($g_Certs).certificate_export_to_pem('MANAGEMENT_MODE_DEFAULT',$cname)
$okey = ($g_Certs).key_export_to_pem('MANAGEMENT_MODE_DEFAULT',$cname)
} else {
write-host "Critical Error Has Occurred. Cannot Initialize secondary iControl"
return $false
}