Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Declined Add VHD to @drivetype

Aug
1,917
68
When I use @drivetype against a vhd drive, it returns;
Code:
e:\utils>echo %@drivetype[g:]
3

Please allow @drivetype to return if a drive is a vhd drive.

PowerShell can determine the drive letter for a mounted vhd;
Code:
PS E:\utils> get-diskimage E:\Optiplex9601\19eccd9d-ac2a-11e6-91e6-806e6f6e6963.vhd | get-disk | get-partition

   DiskPath:
\\?\scsi#disk&ven_msft&prod_virtual_disk#2&1f4adffe&0&000003#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

PartitionNumber  DriveLetter Offset                                    Size Type
---------------  ----------- ------                                    ---- ----
1                G           65536                                 903.8 GB IFS

DiskPart also returns this info;
Code:
DISKPART> detail disk

Microsoft Virtual Disk
Disk ID: F2FD1077
Type   : File Backed Virtual
Status : Online
Path   : 0
Target : 0
LUN ID : 3
Location Path : UNAVAILABLE
Current Read-only State : No
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 6     G   WINDOWS      NTFS   Partition    903 GB  Healthy

Joe
 

Similar threads

Back
Top