Hi,
I hope someone can point me in the direction where I'm going wrong. I've got a few disk moves that I'm trying to automate. For the most part they work fine it's just when changing the Storage Format it's going wrong
Here's the code:
$DST = Get-Datastore -Name 'DataStore1'
# Define Target VM and Target Disk
$Disk = Get-VM -Name "VM1" | Get-HardDisk -Name "Hard Disk 1"
Move-HardDisk -HardDisk $Disk -Datastore $DST -StorageFormat Thick -Confirm:$false
The disk is currently EagerZeroedThick but via the script I managed to change it from Thick to EagerZeroedThick but it refuses to change back using -StorageFormat Thick.
Where am I going wrong?
Thanks in advance
T1b