PowerShell Test-Path returns False when testing a network share
If the Test-Path
cmdlet is truly buggy, then I'd suggest using the Exists()
method on the System.IO.Directory
.NET class.
[System.IO.Directory]::Exists('G:\'); # This returns $true for me
I do think I found the answer with this:
Test-Path $('filesystem::\\Server\share$\install.wim')