I am curious if anyone has had any luck unpinning items from Quick Access using PowerShell? I found the following NTLite post and have been trying to figure out the proper code to UNPIN items. SOLVED - AutomaticDestinations Edits For Quick Access
I don't seem to have an issue pinning using:
However, I can't seem to get items to UNPIN. I did find the following StackOverflow post that Quick Access contains two "sections": Pinned Items and Frequent Folders. Music and Videos are in the second section, unlike the rest (Desktop, Downloads, Documents, Pictures). So the verb to invoke changes goes from unpinfromhome to removefromhome. Is it possible programmatically add folders to the Windows 10 Quick Access panel in the explorer window?
I have included a text file with the PowerShell code I'm using - just in case I have something messed up in there.
I'd also like to pin/unpin items (shortcuts?) to the taskbar, but I'm wondering if I'll end up with the same problem? (Haven't tried yet - stuck on this, first.)
Any help would be greatly appreciated!
I don't seem to have an issue pinning using:
Code:
$Path = "$($env:USERPROFILE)\Music"
$QuickAccess = New-Object -ComObject shell.application
$TargetObject = $QuickAccess.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items() | where {$_.Path -eq "$Path"}
$QuickAccess.Namespace("$Path").Self.InvokeVerb(“pintohome”)
However, I can't seem to get items to UNPIN. I did find the following StackOverflow post that Quick Access contains two "sections": Pinned Items and Frequent Folders. Music and Videos are in the second section, unlike the rest (Desktop, Downloads, Documents, Pictures). So the verb to invoke changes goes from unpinfromhome to removefromhome. Is it possible programmatically add folders to the Windows 10 Quick Access panel in the explorer window?
I have included a text file with the PowerShell code I'm using - just in case I have something messed up in there.
I'd also like to pin/unpin items (shortcuts?) to the taskbar, but I'm wondering if I'll end up with the same problem? (Haven't tried yet - stuck on this, first.)
Any help would be greatly appreciated!