Hello,
So I've been looking into PowerCLI and wrote a Script which automaticly creates a VM. I tested in my Testlab an there it worked perfectly.
I then proceeded to test it in the productive enviroment which is a vCenter 6.5 there I get the Null Error from the New-VM cmdlt.
On the second productive vCenter 6.0 it works fine and also in my testlab with vCenter 6.7 installed.
I've read a few community post where other people have those problem but they didn't pass the portgroup parameter.
I passed the parametes Name, PortGroup, ResourcePool and Datastore. I also tired it with NetworkName instead of PortGroup and/or VMHost instead of ResourcePool.
Anybody an idea what I'm doing wrong or is it just a bug?
Best
Noah