disable validate chack in New-Symlink

Topics: Developer Forum
Aug 20, 2013 at 2:24 PM
Hi all,
Is there a way to disable the targetPath check in New-Symlink?
i'm trying to make a link to a volumeshadow path, and it keeps failing on me.
when i download the source, and create a new NewSymlink2 method, where al of the checking is disabled, it works fine. but a better solution would be to have a -DisableTargetCheck option

$s1 = (gwmi -List Win32_ShadowCopy).Create("C:\", "ClientAccessible")
$s2 = gwmi Win32_ShadowCopy | ? { $_.ID -eq $s1.ShadowID }
$d = $s2.DeviceObject + "\"

this works :
cmd /c mklink /d C:\shadowcopy2 "$d"

this doesnt
New-Symlink C:\shadowcopy "$d"

cause :
a target that looks like "\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy15\"
is not valid.