Mark,
I have found a concoction of scripts that seems to work for me, it is odd, when I run them, quite a few entries report that there is an error, then I will have a run of 10 or more successes (reading out of a text file), then some more errors in a repeating pattern but in the end I can see all of the licenses are being applied.
I can send my notes to you if it helps? sumnerpe at trinity.sa.edu.au is my work email.
Regards,
Peter