VMware Cloud Community
tipsy01
Contributor
Contributor
Jump to solution

New-Harddisk Problems

Guys,

I wonder if someone can help me.

I need to add additional hard disks to several virtual machines and am using the vSphere PowerCLI v5.1 against a vCenter Server running 5.1.0b.  When I attempt to add the disk using the new-harddisk cmdlet I get the following error:

New-Harddisk : Parameter set cannot be resolved using the specified named parameters.

At line:1 char:13

+ new-harddisk <<<< -vm WinXpMstr -capacityGB 100 -diskpath "[VMs] WinXPMstr/1234.vmdk"

+ CategoryInfo     :  InvalidArgument: (:) [New-Harddisk], ParameterBindingException

The full syntax of the command I run is:

new-harddisk -vm WinXPMstr -capacityGB 100 -diskpath "[VMs] WinXPMstr/1234.vmdk"

Thanks


Paul

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You are mixing parameters from different parametersets for the New-Harddisk cmdlet.

In your case CapacityGB and DiskPath can't be used together.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

You are mixing parameters from different parametersets for the New-Harddisk cmdlet.

In your case CapacityGB and DiskPath can't be used together.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos