Link to home
Start Free TrialLog in
Avatar of J G
J G

asked on

Reset Disk identifier

I am trying to reset Disk identifier on one of my hyper-v virtual disks.  AWS support tells me that there is no identifier, and this is preventing me from migrating the virtual disk to the AWS cloud.

I am using the following PS:
 Set-VHD -Path "M:\VMs\Virtual Hard Disks\NC-LBL.vhdx" -ResetDiskIdentifier[1]


I get the following error:

A positional parameter cannot be found that matches parameter name 'ResetDiskIdentifier'

CategoryInfo : InvalidArgument: (:) [Set-VHD], ParameterBindingException
FullyQualifiedErrorID : NamedParameterNotFound, Microsoft.vhd.powershell.setvhdcommand


Could someone assist me with the error?
ASKER CERTIFIED SOLUTION
Avatar of Dr. Klahn
Dr. Klahn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of J G
J G

ASKER

The error still occurs when I take out the [1]

this time I get:

Set-VHD: A parameter cannot be found that matches parameter name 'ResetDiskIdentifier'

 CategoryInfo : InvalidArgument: (:) [Set-VHD], ParameterBindingException
 FullyQualifiedErrorID : NamedParameterNotFound, Microsoft.vhd.powershell.setvhdcommand


If I run the command without the quotes:
Set-VHD -Path M:\VMs\Virtual Hard Disks\NC-LBL.vhdx -ResetDiskIdentifier

Powershell returns:

Set-VHD: A positional parameter cannot be found that accepts argument 'Disks\NC-LBL.vhdx'.
At line:1 char :1
+Set-VHD-Path M:\VMs\Virtual Hard Disks\NC-LBL.vhdx -ResetDiskIde...
+CategoryInfo  :InvalidArgument: (:) [Set-VHD], ParameterBindingException
+FullyQualifiedErrorID:PositionalParameterNotFound, Microsoft.VHD.PowerShell.SetVhdCommand
Try reversing the position of the options?
Avatar of J G

ASKER

could you provide me with an example of the syntax?
Avatar of J G

ASKER

When I type in:

"Set-VHD -Path M:\VMs\Virtual Hard Disks\NC-LBL.vhdx"

I get:

cmdlet Set-VHD at command pipeline position 1
Supply values for the following parameters:
ParentPath:


the issue is, There is no parent path/differentiating disks, and I cannot leave it null.

Any ideas?
might help if we knew which version of powershell and what that command requires
get-help set-vhd

they may be using an older version of powershell or powershell core
Avatar of J G

ASKER

The Hyper-v host is using powershell 3, I will upgrade tonight to v5.  Hopefully that will fix the issue.
Avatar of J G

ASKER

I updated the Windows Mangament Framework on the Hyper-V host.  PS version 5.1

Still the exact same issue