How to check drive is it a virtual (created using subst
command)?
Get-VirtualDisk
doesn't work(powershell 3.0)
You could extract the first character from each line of subst
output into an array and check if a particular drive is contained in that array:
$substed = subst | % { $_.Substring(0,1) + ':' }
if ( $substed -contains 'x:' ) {
# do stuff
}