Is it possible programmatically add folders to the Windows 10 Quick Access panel in the explorer window?

前端 未结 9 910
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 12:18

Apparently Microsoft has (sort of) replaced the \"Favorites\" Windows explorer item with the Quick Access item. But I haven\'t been able to find a way to programmatically ad

9条回答
  •  野性不改
    2020-11-28 12:34

    I like Johan's answer but I added a little bit to make not remove some of the items that were already in there. I had a ton pinned in there by accident I must have selected pin folder or something to quick access.

    $QuickAccess = New-Object -ComObject shell.application 
    $okItems = @("Desktop","Downloads","Documents","Pictures","iCloud Photos","iCloud Drive","PhpstormProjects","Wallpapers 5","Videos", "Schedules for testing")
    ($QuickAccess.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items() | where {$_.name -notin $okItems}).InvokeVerb("unpinfromhome");
    

提交回复
热议问题