How to pin to start menu using PowerShell
问题 I can pin some programs to taskbar on Win7 using PowerShell. $shell = new-object -com "Shell.Application" $folder = $shell.Namespace('C:\Windows') $item = $folder.Parsename('notepad.exe') $verb = $item.Verbs() | ? {$_.Name -eq 'Pin to Tas&kbar'} if ($verb) {$verb.DoIt()} How do I modify the above code to pin a program to the Start menu? 回答1: Another way $sa = new-object -c shell.application $pn = $sa.namespace($env:windir).parsename('notepad.exe') $pn.invokeverb('startpin') Or unpin $pn