Product:
Cognos TM1 10.2.2
Microsoft Windows 7
Problem:
How update several workstations with the new TM1 certificates?
Solution:
If the users are allowed to run a POWERSHELL script, then something like this may solve the issue:
(you need to adjust PATH for your environment)
# the new certs need to be unziped in folder C:\NewSSLCerts
$strPath = “C:\Program Files\ibm\cognos\tm1_64\bin64\ssl\”
$strFile = “applixca.pem”
$strFileName= $strPath + $strFile
If (Test-Path $strFileName){
Copy-Item -Path C:\NewSSLCerts\*.* -Destination $strPath
$CMD = $strPath + ‘importsslcert.exe’
$arg1 = ‘-remove’
& $CMD $arg1
& $CMD
}Else{
# // File does not exist
}
# only copy the files to other folders
$strPath = “C:\Program Files\ibm\cognos\tm1_64\bin\ssl\”
$strFile = “applixca.pem”
$strFileName= $strPath + $strFile
If (Test-Path $strFileName){
Copy-Item -Path C:\NewSSLCerts\*.* -Destination $strPath
}Else{
# // File does not exist
}
# only copy the files to other folders like 32 bit version
$strPath = “C:\Program Files (x86)\ibm\cognos\tm1\bin\ssl\”
$strFile = “applixca.pem”
$strFileName= $strPath + $strFile
If (Test-Path $strFileName){
Copy-Item -Path C:\NewSSLCerts\*.* -Destination $strPath
}Else{
# // File does not exist
}
# only copy the files to other folders like other drive
$strPath = “d:\Program Files (x86)\ibm\cognos\tm1\bin\ssl\”
$strFile = “applixca.pem”
$strFileName= $strPath + $strFile
If (Test-Path $strFileName){
Copy-Item -Path C:\NewSSLCerts\*.* -Destination $strPath
}Else{
# // File does not exist
}
More Information:
http://stevehardie.com/2013/04/powershell-check-if-file-exists/