I have a Powershell script that runs in Windows11 every time a computer loads, to pin a folder to Quick Access. It is based on this thread.
It works, however if the user already had the folder pinned, it will remove the folder instead of leaving it in place. Essentially it acts as a toggle.
I've looked around for some documentation on the InvokeVerb() method but have't found anything clear yet. I would have thought "pintohome" would just leave the pinned folder in place if already there.
Any idea why this is happening? Is it a Windows11 thing?