This script can be used to:
The script includes a function which can be invoked using the following syntax:
Set-VsanClusterLicense -License "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" -Cluster "ClusterName"
Things to add... For licenses that are per CPU, maybe determine if enough licenses are available.