Anyone who has looked into replacing the vCentre Single Sign On certificates will know that doing this is a pain. So, I have created a script which will hopefully improve things. This simple batch file script will automate the procedure detailed in pages 12 - 14 of the "Replacing Default vCentre and ESXi Certificates" document http://www.vmware.com/files/pdf/techpaper/vsp_51_vcserver_esxi_certificates.pdf
This script assumes that you have just installed \ upgraded vCentre to 5.1 and have generated the required rui.key, rui.crt and rui.pfx certificate files required by vCentre to update SSO. Also, it assumes that all vCentre components are installed in their default locations.
Create a directory to store the certificates (I recommend using a path without any spaces)
Copy rui.key, rui.crt and rui.pfx certificate files into this directory
Copy ReplaceSSOCerts.cmd into this directory
Open an elevated command prompt and browse to the directory above
Now run the script:
ReplaceSSOCerts.cmd %FQDNOFVCENTRE% %CERTDIR% %PASSWORD%
%PASSWORD% is the password used for the admin@System-Domain account
Below is an example of the script in action (Removed vCentre FQDN from output)

If you have any improvements to the script then let me know and I will happily update it.
[Jurgen Van de Perre]
UPDATE 30/01/2013 - Updated the script to version 0.2 to comply with the SSL pointing to the Root64.cer in the properties file and the SSO using the Java KeyStore file.
The following things have changed:
- Changed the second parameter to KeyStore-Dir (looks for the root-trust.jks file)
- Added a fourth parameter to add the Root64.cer directory location
- Updated the Script usage with these parameters
- Changed the filetest to also look if the root-trust.jks file exists in the Certificate Directory
- Test if the script can locate the Root64.cer file
- Updated the properties file according to http://www.vmware.com/files/pdf/techpaper/vsp_51_vcserver_esxi_certificates.pdf (page 20) to use the JKS in the SSL parameter.
- Changed the ssocli configure-riat command to use the root-trust.jks
The command for v2 is "ReplaceSSOCerts.cmd <SSO Server FQDN> <Certificates directory containing root-trust.jks> <Admin-Passsword> <Root64.cer directory>"
This script should now be up to date with the latest instructions from vmware. I uploaded it as Replace SSOCertsv_2.cmd. I have tested it also in my lab environment and works perfectly:


Disclaimer: This script has only been used in a limited lab environment and should not be used in a production environment without prior testing