I want to script some file operations on a particular external drive, that MUST NOT happen on any other drive (backups). The drive letter isn't a reliable identifier, so I found the volume ID and an UNC path referencing the drive using this volume ID through mountvol:
\\?\Volume{77013d6b-100000} (truncated for clarity)
While I am able to access a subdirectory using
Set-Location -LiteralPath \\?\Volume{77013d6b-100000}\path-that-exists
I cannot simply go to the disk's root:
Set-Location -LiteralPath \\?\Volume{77013d6b-100000} says that it cannot find the path because it does not exist.
How can I navigate directly to the external hard disk's root using only its volume ID?