How would i go about creating multiple vm's on localhost

I’ve been attempting to use xHyperV.
I’ve tried the multiple nodes approach.
That obviously has the flaw that it’s trying to create the vm on a vm that does not exist.

I’ve tried 1…VmCount | %{ Create VHD, Create VM }.

That has the issue that the vhd/vm object already exist when it tries the 2nd time.

I’m out of ideas here.

Well, sure. When you create a new VHD, you need to give it a unique filename. It would help somewhat to see the actual syntax that you’re trying to use, instead of what you put in your post.

And I’m not sure what you mean by “multiple node approach.” This should be targeted at one node to have all the VMs created on one node. But yes, you’ll need to have a unique way of specifying filenames and whatnot, since each instance is going to require a certain amount of unique information.