Hi, Amazing script. Having some problems when i want to add the file explorer link. Set-PinnedAppli
cation -Action PinToTaskbar -FilePath "\\npcloud\tsas p\HorizonStartM enuASP\Programs \File Explorer.lnk" I am getting an error on line 65, char 13 on the orignal script. Error: Verb Pin to Taskbar not found. At line:65 char:13 + throw "Verb $verb not found." + ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ + CategoryInfo : OperationStoppe d: (Verb Pin to Taskbar not found.:String) , RuntimeExceptio n + FullyQualifiedE rrorId : Verb Pin to Taskbar not found. Thanks for help Jone
Jan, Amazing script! I really like. I find myself forgetting which actions are available so I made a small modification to 1 line to ensure greater success. [Parameter(Mand
atory=$true)][V alidateSet("Pin toStartMenu","U npinfromStartMe nu","PintoTaskb ar","UnpinfromT askbar")][strin g]$Action Hope this helps! Thanks, Ben
Hello, The scripts can work on Win7.But I want to use it on Win8.On Win8 Pin to taskbar can work correctly,but pin to start menu has error. By the way,On Win8,how can i pin(Upin) a EXE file on start screen(Metro) UI? Any suggestions? Best Regards Eric
Hello All Can some one check this script and tell me why it is not working on Windows 7. I used a Windows 8 PC to do the script and test it and it work properly. The script basically unpin the Mozilla Firefox from task bar for all users. Thanks. Sub ShowFolderList(
folderspec) on error resume next Dim fs, f, f1, fc, s Set objShell = CreateObject("S hell.Applicatio n") Set objFSO = CreateObject("S cripting.FileSy stemObject") Set fs = CreateObject("S cripting.FileSy stemObject") Set f = fs.GetFolder(fo lderspec) Set fc = f.SubFolders For Each f1 in fc REM wscript.echo "Here is all the sub folders : " & f1.name strFileName = objFSO.GetFileN ame(f1) REM wscript.echo "value of strFileName is : = " & strFileName Set objFolder = objShell.Namesp ace("C:\Users\" & strFileName & "\AppData\Roami ng\Microsoft\In ternet Explorer\Quick Launch\User Pinned\TaskBar" ) Set objFolderItem = objFolder.Parse Name("Mozilla Firefox.lnk") Set colVerbs = objFolderItem.V erbs For Each objVerb in colVerbs If Replace(objVerb .name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt REM wscript.echo " Unpin successfully for user : = " & strFileName else REM wscript.echo " There is nothing to Unpin for user : = " & strFileName end if Next Next End Sub showfolderlist "C:\Users"
Wow this is a great script! I would really like to use it on Windows 8. But each time I do I get the following error: PS C:\> Set-PinnedAppli
cation -Action UnPinFromStartM enu -FilePath “C:\WINDOWS\sys tem32\notepad.e xe” Exception calling “DoIt” with “0″ argument(s): “The parameter is incorrect. (Exception from HRESULT: 0×80070057 (E_INVALIDARG)) ” At C:\PinnedApplic ation.psm1:67 char:13 + $itemVerb.DoIt( ) + ~~~~~~~~~~~~~~~ ~ + CategoryInfo : NotSpecified: (:) , MethodInvocatio nException + FullyQualifiedE rrorId : ComMethodTarget Invocation This happens whether I’m calling the UnPinFromStartM enu OR PinToStartMenu actions… Anybody have any ideas how to get it to run on Windows 8?
Hi Jan, I've tested the PS script on a W7 64 bit workstation and it works like a charm. But now I'm trying to get this script to work by using a GPO with a logon script calling this module. And I cannot get it to work. I am using a Windows Server 2008R2 domain controller and a W7 64 bit workstation for the test. This is what I have done: 1. I have put the PinnedApplicati
ons.psm1 file on the domain controller 2. I use the powershell tab for the logon script and filled it with the following parameters: Script name: PinnedApplicati ons.psm1 Script parameters: Set-PinnedAppli cation -Action PinToStartMenu -FilePath "C:\WINDOWS\sys tem32\notepad.e xe" What am I doing wrong? Best regards, Saskia
I also can not access the verbs via powershell. It is available via the gui but not via code. Does anyone have a work around Name ---- &Open Run as &administrator Pin to Tas&kbar Restore previous &versions Cu&t &Copy Create &shortcut &Delete Rena&me P&roperties
What I see is that the Verb "Pin To start" is missing when you programmaticall
y retrieve them from the shortcut object. Where if you right click, it is available in the context menu. So, something changed, the question is: "where did it go?"
If you are getting "Verb [...] not found.", make sure you can pin it manually through the context menu. If it is missing the entries, it might be due to the filename containing anything from the registry key "HKLM\SOFTWARE\
Microsoft\Windo ws\CurrentVersi on\Explorer\Fil eAssociation\Ad dRemoveNames". For example, a file called "helpdesk.exe" cannot be pinned because the name contains "help". Apparently this was introduced to reduce unwanted links from showing up in the frequently used list: http://blogs.ms dn.com/b/oldnew thing/archive/2 007/06/15/33010 04.aspx If you don't care about that, removing entries from the registry key works (after the next logon). Otherwise you'll have to rename the executable.
First of all, great module. I want to use it to replace the current VBS script that I'm using. It works so far but the applications that are pinned have the text (Desktop) added to the name. Why is this added? Is there a way to prevent this?
Can I pin an exe (from a network share) to start menu? Set-PinnedAppli
cation-Action PinToStartMenu -FilePath "\\server1\shar e1$\file.exe" I tried the above but I got: + throw <<<< "Verb $verb not found." ... .. . but I could pin the same exe when I copy it to local: Set-PinnedAppli cation-Action PinToStartMenu -FilePath "c:\temp\file.e xe"