So I have implemented the following snippet
$mountVHD = Mount-VHD -Path $vhdPath -ComputerName $hostName -Passthru
$VHDInfo = Get-VHD -Path $vhdPath -ComputerName $hostName
$VHDInitialization = Initialize-Disk 7 -PartitionStyle MBR
Everytime I execute Initialize-Disk, I return an error as following
Initialize-Disk : Unspecified Error
Extended information: The device is not ready.
At line:1 char:1
+ Initialize-Disk 7
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (StorageWMI:ROOT/Microsoft/Windows/Storage/MSFT_Disk) [Initialize-Disk], CimException
+ FullyQualifiedErrorId : StorageWMI 2,Initialize-Disk
When I manually try to Attach VHD, Initialize the disk, etc, I get the same error, "The Device is not ready."
Is this something to do with utilizing a dynamic vs static VHD. I can't seem to find any answers to this issue. I even tried the following