I've read and borrowed a lot of pointers from Lam over at VirtualGhetto, but I've been trying to extend his libraries a little further as well as understand some of the nuances of the API. I'm not a JSON expert by any stretch, but I've put my time into trying to understand the syntax. However, the HCX API has worked in several locations, but has either failed or escaped me in others. For instance, what is the difference between the migration Cancel and Delete calls? Are they both the same? Or does one just remove the schedule and completes the migration ASAP (like Remove Schedule from the GUI.) I would image the call would need the current migrationId, but how do I tell if it needs more inputs. Through trial and error, I know the Cancel just requires the migrationID, but I'm not sure about the Delete (it failed when i tried various parameters.) And how do I code a date change in the schedule? I assume it is the Update call, but even thought I pass in the original Migration ID, it just spawns another migration that sits at 'waiting' in the progress meter. Finally, unlike the new migration schedule commands, I can't seem to find a rescheduled migration from the GUI in the logs. I figured that if I could see the syntax in the logs, it would help solve these mysteries.
If anyone has any pointers, it would be graciously appreciated!
Currently located on the powershell gallery at version 11.3 and seem to be working as expected.
We use these to stretch networks, move vms and check status. This is far faster than using the gui