1

I do have a Server with plenty of volumes where some are mounted in different directories and others have drive letters. I´m looking for a way to run something like this in Powershell

foreach ($element in (Get-Volume).Path) {

Get-childitem -path $element -File}

but i haven´t found a way that -path is accepting the volume UID

2 Answers 2

4

Try changing the -Path parameter to -LiteralPath:

 Get-ChildItem -LiteralPath '\\?\Volume{45908b94-0000-0000-0000-100000000000}\'

This works for me.

0

No luck with this either, but:

Cmd.exe will accept the GUID in a dir command provided the trailing backslash is doubled.

C:\> dir \\?\Volume{26a449ef-cba1-4ed4-8b68-0958ea44d71d}\\

Explorer will also show the volume when using

PS> start "\\?\Volume{53663bce-0000-0000-0000-30b51000000}\"

Some links on the issue
Google search
Volume GUIDs – Ways To View/Access The Files Within
Access to a disk drive using volume ID

1
  • I know that post already but I don't want to start an explorer but want to work with the ps output in some CSV export.
    – toprock
    Commented Aug 29, 2017 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .