Maybe this is helpful to get started:
In addition you need a file containing the VM names and run the code for each vm name.
Instead of a list with names it's also possible to create a name with PowerShell, for instance vm01
, vm02
, vm03
, ...
Without more details of you requirements it's not that easy to help.
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten