I am trying to use a PowerCli commandlet to create a new virtual machine
New-VM -ResourcePool vfcplvmh0009 -Version v11 -Name TestServer22 -Datastore 0031_A_Normal001 -DiskGB 100 -DiskStorageFormat EagerZeroedThick -MemoryGB 4 -NumCpu 2 -CoresPerSocket 2 -Template Win2012-STDR2_GoldenImage -Confirm $false
However it will not run and displays the following error message
New-VM : Parameter set cannot be resolved using the specified named parameters. At line:1 char:1 + New-VM -ResourcePool vfcplvmh0009 -Version v11 -Name TestServer22 -Da ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-VM], ParameterBindingException + FullyQualifiedErrorId : AmbiguousParameterSet,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM
I am unsure as to why this error message is being generated as all the parameters and data for them appear to be correct.
New-VM
cmdlet parameters have different parametersets. You can not mix parameters from different parametersets. This should help explain – jrider