Created
August 6, 2017 21:08
-
-
Save dlinsley/116bebd79920c939241bc620f3449799 to your computer and use it in GitHub Desktop.
Assign license to ESXi HostSystem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VMware vRealize Orchestrator (vRO) action sample | |
// | |
// Assign license key to ESXi Host (HostSystem) | |
// | |
// For vRO v7.0+ | |
// | |
// Action Inputs: | |
// host - VC:HostSystem | |
// license - string | |
// | |
// Return type: void | |
// consider using sample: https://code.vmware.com/samples/1479/decode-vsphere-license | |
// to validate license | |
if (!license || license.length != 29) { | |
throw("invalid license key") | |
} | |
host.sdkConnection.licenseManager.licenseAssignmentManager.updateAssignedLicense(host.id, license); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment