如何获得快速访问路径

How to get the Quick acces Paths

我想把所有路径写在一个文本文件的快速访问中。对于普通文件夹,这不是问题。但是快速访问不是文件夹,我不知道如何阅读里面的内容。有人可以帮助我吗?

您可以为此使用 COM:

$shell = New-Object -ComObject Shell.Application 
$paths = $shell.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items() | ForEach-Object { $_.Path }

# view on screen
$paths

# write to text file
$paths | Set-Content -Path 'X:\MyQuickAccessPaths.txt'

# don't forget to remove the used COM object from memory when done
$null = [System.Runtime.Interopservices.Marshal]::ReleaseComObject($shell)
[System.GC]::Collect()
[System.GC]::WaitForPendingFinalizers()