简体   繁体   中英

Pin tiles inside of existing groups inside of Windows 10

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM