Save this as license_deploy.sh :

Returns license name, type (eval/permanent), and remaining days.

If you are still on a Windows-based vCenter (6.x or earlier), you can use: