I have one old certificate and one new certificate in my keystore hence i want to remove the old cert by using the wsadmin script and also import the new one using wsadmin script.
i have listed the cert using this command -
Command to List certs -
AdminTask.listPersonalCertificate('[-keystorename <test_store> -keystorescope <test_scope>')
i received complete output and also i want to compare the certs using the validity so that i will remove the old cert only.
Thanks
Typically you would use the admin console, with command assistance turned on, to perform the operation you wish to script, then examine the output of command assistance.  Just note, not all admin console operations go through a scriptable path, in that case, you'll need to look at the security mbean operations for examples.
How to create script to import and delete personal certificate in websphere application server using wsadmin?