Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 49146

Re: select template via portgroup and datastore

$
0
0

PS U:\vmwarescript> [Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; & 'U:\vmwarescript\Create from CSV.ps1'
New-VM : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomation.ViCore.Types.V1.Inventory.Template' required by parameter 'Template'. Specified method is not supported.
At U:\vmwarescript\Create from CSV.ps1:63 char:17
+    $vm = New-VM @sVM
+                 ~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-VM], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM
 
Get-NetworkAdapter : Cannot validate argument on parameter 'VM'. The argument is null. Provide a valid value for the argument, and then try running the command again.
At U:\vmwarescript\Create from CSV.ps1:65 char:27
+    Get-NetworkAdapter -VM $vm | Set-NetworkAdapter -MacAddress $row.M ...
+                           ~~~
    + CategoryInfo          : InvalidData: (:) [Get-NetworkAdapter], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.GetNetworkAdapter
 
Set-Annotation : Cannot validate argument on parameter 'Entity'. The argument is null. Provide a valid value for the argument, and then try running the command again.
At U:\vmwarescript\Create from CSV.ps1:67 char:27
+    Set-Annotation -Entity $vm -CustomAttribute Ansprechpartner -Value ...
+                           ~~~
    + CategoryInfo          : InvalidData: (:) [Set-Annotation], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

 

 

and some more


Viewing all articles
Browse latest Browse all 49146

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>