Hi Glenn Maxwell,
It seems like there is an issue with the data type of the $image.Id
parameter. The Set-AzDiskImageReference
cmdlet requires a string data type for the -Id
parameter, but it seems like $image.Id
is an object array.
You can try converting the $image.Id
object array to a string using the -join
operator. Here's an example:
Set-AzDiskImageReference -Disk $diskConfig -Id ($image.Id -join "") -Lun 0 -Verbose
This should convert the $image.Id
object array to a string and pass it to the -Id
parameter of the Set-AzDiskImageReference
cmdlet.It seems like there is an issue with the data type of the $image.Id
parameter. The Set-AzDiskImageReference
cmdlet requires a string data type for the -Id
parameter, but it seems like $image.Id
is an object array.
You can try converting the $image.Id
object array to a string using the -join
operator. Here's an example:
Set-AzDiskImageReference -Disk $diskConfig -Id ($image.Id -join "") -Lun 0 -Verbose
This should convert the $image.Id
object array to a string and pass it to the -Id
parameter of the Set-AzDiskImageReference
cmdlet.
Tag me in your comments for further discussion.