- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I updated the script using this instead and I am getting a puzzling error, below. If I just run 'New-Object -TypeName VMware.Vim.HostPortgroup' I can see the structure of the object, but when it is added to '$spec', get-method says it is just string, not the HostPortgroup object.
$spec.Portgroup = New-Object -TypeName VMware.Vim.HostPortgroup
$spec.Portgroup.Key = $pg.ExtensionData.Key