0

I am working on a rollout of customized start menus for a large number of end users and PC's. Due to the complexity of the roles, creating and importing XML is not ideal. I have not found any resource on adding pinning tiles inside of menu groups or folders inside of those. I am attempting to modify this script to add inside of an existing menu group. Any ideas on where to find the insert to folder instruction?

function Pin-App { param(
 [string]$appname,
 [switch]$unpin
 )
 try{
 if ($unpin.IsPresent){
 ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'From "Start" UnPin|Unpin from start'} | %{$_.DoIt()}
 return "App '$appname' unpinned from taskbar"
 }else{
 ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'To "Start" Pin|Pin to Start'} | %{$_.DoIt()}
 return "App '$appname' pinned to Start"
 }
 }catch{
 Write-Error "Error Pinning/Unpinning App! (App-Name correct?)"
 }
 }
 #Example of a pinned app
 Pin-App "Calculator" -pin

This works but only to pin an unpin indiscriminately. For my project I need to find a way to pin to a group or folder inside of a group. Has anyone encountered this? My advanced googling came up empty. Additionally I am aware that Microsoft is not keen on allowing this to prevent abuse. I am not interested in a 3rd party start menu. I am only looking for a direction to adding the folder and group structure in real time for a very large managed group of computers running Windows 10 Pro 1703.

Powershelling
  • 133
  • 1
  • 6
  • Microsoft has been pretty clear about attempting to prevent programmatic access to Start Menu Tiles and recommends the usage of the Enterprise GPO which then allows all of the standard filtering methods of Group Policy to meet the different use cases. – BenH May 22 '18 at 17:17
  • I am aware of this. But if objects can be added via install / uninstall and through the script above, they can be added to the group. Unfortunately Microsoft seems to have ignored enterprises in their programmatic access rules which has caused many to circumvent them. – Powershelling May 22 '18 at 17:55
  • So what's the question, then? – Bill_Stewart May 22 '18 at 18:13
  • Although it is obfuscated, they should be a way to do this. Is there a way to alter what I have above to make the changes to the start menu? If so how would I go about finding and recreating it? – Powershelling May 23 '18 at 13:36
  • If there's not an official API for it, my assumption is that it's an implementation detail (and therefore subject to change at any time without notice). – Bill_Stewart May 24 '18 at 02:01

1 Answers1

0

So Microsoft, in the infinite wisdom, have decided for businesses, administrators and everyone else that they want end users only to decide what is on the start menu. I have created a solution for this and will post once it is verified in current iterations of the operating system. It employs a dynamic and supported mechanism to generate a layout modification XML and apply it via GPO based on varying parameters (whitelist, blacklist, folder grouping etc).

I hope someone from Microsoft realizes that this makes management that administrators have come to expect nearly impossible. It makes me want to switch to Mac or Linux.

Powershelling
  • 133
  • 1
  • 6
  • There are multiple supported ways to setup the startmenu (GPO, Import-Startlayout). I also believe that enforcing a layout to your users isn't the way to go in 2018 (10 years ago you would do that), but that's another discussion of course. – bluuf May 25 '18 at 12:27