How to automatically (cmd/powershell script) unpin all apps in start

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 1
    Windows 10
       #11

    You guys helped me out tremendously.


    Is there a way to add other apps like Outlook, Word basically the entire office suite?
    I tried using the
    Pin-App "outlook" -pin

    But it does not add it
      My Computer


  2. Posts : 5,478
    2004
       #12

    Sje1492 said:
    Is there a way to add other apps like Outlook, Word basically the entire office suite?
    You can download the PinItemToStartMenu.pm1 module from here Script to pin items to Start menu in Windows 8 (PowerShell)

    Import it and then add what you want with Set-OSCPin as described in the help. If you install this module above you could add them like this (but you'd have to change the path if you don't use Office 2016)
    Code:
    Set-OSCPin -Path= `
    "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE", `
    "C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE", `
    "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE"
    I tested it (as below) and it works for Outlook 2016 on Windows 10 AE - this is just code stripped from the link above to just add Outlook...
    Code:
    $itemPath ="C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE"
    
    $Shell = New-Object -ComObject Shell.Application
    $Desktop = $Shell.NameSpace(0X0)
    $WshShell = New-Object -comObject WScript.Shell
    
    $itemName = Split-Path -Path $itemPath -Leaf
    $ItemLnk = $Desktop.ParseName($itemPath)
    $ItemVerbs = $ItemLnk.Verbs()
    
    Foreach($ItemVerb in $ItemVerbs) {
        If($ItemVerb.Name.Replace("&","") -match "Pin to Start") {
           $ItemVerb.DoIt()
        }
    }
      My Computer


  3. Posts : 3
    windows 10
       #13

    After running the script I have like 10 tiles left.

    1 -People
    4 -a great app is on its way
    5 - download arrow(s)

    How to automatically (cmd/powershell script) unpin all apps in start-20161220_114315.jpg

    What script could I add to remove them?
      My Computer


  4. Posts : 3
    windows 10
       #14

    i followed this & got everything off but whats shown in the picture below. could you help with a script that would remove the listed tiles & set a default wallpaper?

    How to automatically (cmd/powershell script) unpin all apps in start-20161220_114315.jpg
      My Computer


  5. Posts : 4
    win10 mostly
       #15

    irrefutable14 said:
    i followed this & got everything off but whats shown in the picture below.
    I found very similar results when using the powershell suggested by this thread. Firstly, if this is an image I'd highly recommend using a clean version of Win10. It looks like you are using the OEM version that came on a machine, this could be part of your problem. With the 1607 update, Microsoft now provides an easy way to install a clean copy of Windows:

    How to use 'Refresh Windows' to do a clean install of Windows 10 Anniversary Update | Windows Central

    Secondly, try altering the DefaultLayouts.xml as I suggested earlier in the thread.

    GeneralG said:
    Win10: Start Menu Cleanup using DefaultLayouts.xml | David Segura

    I was having difficulties using the Start Layout group policy and the powershell import-startlayout, so instead I modified the DefaultLayouts.xml directly. This file is located in directory "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell".
    Now when I create a new local user, gone are all those aggravating tiles that reference nonexistent preinstalled apps. I'm still working on perfecting it, as my current version does leave behind Edge, Store, and Settings tiles.
    I still have yet to figure out how to get ride of those three tiles, but I've learned to live with it and just remove them by hand.

    The only problem with this solution is that it only applies when new users are created. You may have to go into your image (either online or offline) and directly alter the DefaultLayouts.xml file, rather than running an "after-the-fact" script. My saying: if it can be done in the image, do it in the image. Otherwise, use a script.
      My Computer


  6. Posts : 3
    windows 10
       #16

    I have over400 tablets to update to windows 10. They are acer w4-820. I'm not using a clean install I'm simply updating. So manually removing over 10+ tiles and setting a default wallpaper & re-pinning tiles is very time consuming. I've used the script from the prior post to remove the basics but skype & a couple of games along with the arrows are remaining. This is whats left of the default layout after.

    The problem with sending a image is that the don't belong to a domain "windows 8 environment with no GP"

    <LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
    <LayoutOptions StartTileGroupCellWidth="8" />
    <DefaultLayoutOverride>
    <StartLayoutCollection>
    <defaultlayout:StartLayout GroupCellWidth="8" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
    <start:Group Name="Life at a glance" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout1.2" DisplayName=" " Size="2x2" Column="4" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout1.3" DisplayName=" " Size="2x2" Column="6" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.1" DisplayName=" " Size="2x2" Column="6" Row="2" Arguments="creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo2.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    </start:Group>
    <start:Group Name="Play and explore" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout1.4" DisplayName=" " Size="2x2" Column="0" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.2" DisplayName=" " Size="2x2" Column="4" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo2.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.3" DisplayName=" " Size="2x2" Column="6" Row="0" Arguments="creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo2.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout1.5" DisplayName=" " Size="2x2" Column="0" Row="2" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.4" DisplayName=" " Size="2x2" Column="4" Row="2" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.5" DisplayName=" " Size="2x2" Column="6" Row="2" Arguments="creative-ms:default?p=DefaultStartLayout2&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo2.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    <start:SecondaryTile AppUserModelID="Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy!App" TileID="PreInstalled.DefaultStartLayout2.6" DisplayName=" " Size="2x2" Column="0" Row="4" Arguments="creative-ms:default?p=DefaultStartLayout1&amp;launch=ms-get-started://redirect%3Fid=placeholdertiles" Square150x150LogoUri="ms-appx:///Experiences/PreInstalledApps/DefaultSquareTileLogo1.png" Wide310x150LogoUri="ms-appx:///" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#00000000" />
    </start:Group>
    </defaultlayout:StartLayout>
    </StartLayoutCollection>
    </DefaultLayoutOverride>
    </LayoutModificationTemplate>
    ?Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager]
    ;0 = No Disable
    ;1 = Yes Enable (Default)
    "PreInstalledAppsEnabled"=dword:00000000
      My Computer


  7. Posts : 4
    win10 mostly
       #17

    irrefutable14 said:
    The problem with sending a image is that the don't belong to a domain "windows 8 environment with no GP"
    Whether or not you are in a domain environment shouldn't effect your ability to use a custom image. Not to get into an argument about the benefits of imaging, but updating 400 tablets by hand sounds much more time consuming than building an image that works exactly how you want even if you have to push it to each tablet individually.

    Regardless, if you are dead set on simply updating the tablet, rather than re-imaging, there's only one other thing I can think of:

    Maybe you could do a batch that replaces the "DefaultLayouts.xml" and then creates a new user. Here's the clean "DefaultLayouts.xml" what I used in my image:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <FullDefaultLayoutTemplate 
        xmlns="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
        xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
        Version="1">
        <StartLayoutCollection>
            
    
          <!-- 8 cell wide Desktop layout with Preinstalled apps -->
          <StartLayout
              GroupCellWidth="8"
              PreInstalledAppsEnabled="false">
              <start:Group
                  LocalizedNameResourceTag="TileGrid_DefaultGroup1">
                  
                             
                  
              </start:Group>
              <start:Group
                  LocalizedNameResourceTag="TileGrid_DefaultGroup2">
               
                  
                  
              </start:Group>
          </StartLayout>
    
        </StartLayoutCollection>
    Of course, this doesn't apply to any existing users, so after replacing the file, you'll have to create a new user. The batch would be super simple, I'm thinking would look something like this:

    Code:
    copy <pathTOcleanXML>\DefaultLayouts.xml C:\Users\Default\AppData\Local\Microsoft\Windows\Shell
    net user <newusername> <password>
    You may need to include some switch on the "copy" command to force overwrite, or you may need to use "xcopy" instead. Also, you could do a "net user <name> /delete" to remove the old user profile if you so desire.

    This all assumes that you are not attached to the current user profile on the tablets. As far as I know, there is no easy way to remove ALL the tiles for existing user profiles. In summary, the powershell script suggested by this thread doesn't get all of the tiles due to Microsoft's strange fascination with forcing "apps" down people throats. Meanwhile, the DefaultLayouts and LayoutModifcation methods only apply to new users or users included in an image, i.e. the default admin (and to be sure, these still leave 2-3 tiles in existence).

    Anyways, good luck with those tablets, they're always the absolute worst to manage.
      My Computer


  8. tmc
    Posts : 1
    Win 10
       #18

    lx07 said:
    You can download the PinItemToStartMenu.pm1 module from here Script to pin items to Start menu in Windows 8 (PowerShell)

    }[/code]
    This is a great fine - for me!

    Windows 10 bug bare of mine is having to remove ALL Start Menu Tiles and had finally found a script for this :) but still had to add the required Tiles for my users and your post has helped complete that :)

    Here's a copy of my code in current raw state!;
    $getstring = @' [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern IntPtr GetModuleHandle(string lpModuleName); [DllImport("user32.dll", CharSet = CharSet.Auto)] internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); public static string GetString(uint strId) { IntPtr intPtr = GetModuleHandle("shell32.dll"); StringBuilder sb = new StringBuilder(255); LoadString(intPtr, strId, sb, sb.Capacity); return sb.ToString(); }'@$getstring = Add-Type $getstring -PassThru -Name GetStr -Using System.Text$unpinFromStart = $getstring[0]::GetString(51394)(New-Object -Com Shell.Application).NameSpace("shell:::{4234d49b-0245-4df3-b780-3893943456e1}").Items() | ForEach { $_.Verbs() | Where {$_.Name -eq $unpinFromStart} | ForEach {$_.DoIt()}}Import-module -Name C:\tmc\software\startmenu\legacy\PinItemToStartMenu -Verbose$itemPath ="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Outlook 2016.lnk"$Shell = New-Object -ComObject Shell.Application$Desktop = $Shell.NameSpace(0X0)$WshShell = New-Object -comObject WScript.Shell$itemName = Split-Path -Path $itemPath -Leaf$ItemLnk = $Desktop.ParseName($itemPath)$ItemVerbs = $ItemLnk.Verbs()Foreach($ItemVerb in $ItemVerbs) { If($ItemVerb.Name.Replace("&","") -match "Pin to Start") { $ItemVerb.DoIt() }}$itemPath ="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Word 2016.lnk"$Shell = New-Object -ComObject Shell.Application$Desktop = $Shell.NameSpace(0X0)$WshShell = New-Object -comObject WScript.Shell$itemName = Split-Path -Path $itemPath -Leaf$ItemLnk = $Desktop.ParseName($itemPath)$ItemVerbs = $ItemLnk.Verbs()Foreach($ItemVerb in $ItemVerbs) { If($ItemVerb.Name.Replace("&","") -match "Pin to Start") { $ItemVerb.DoIt() }}$itemPath ="C:\Program Files (x86)\Microsoft Office\root\Office16\excel.exe"$Shell = New-Object -ComObject Shell.Application$Desktop = $Shell.NameSpace(0X0)$WshShell = New-Object -comObject WScript.Shell$itemName = Split-Path -Path $itemPath -Leaf$ItemLnk = $Desktop.ParseName($itemPath)$ItemVerbs = $ItemLnk.Verbs()Foreach($ItemVerb in $ItemVerbs) { If($ItemVerb.Name.Replace("&","") -match "Pin to Start") { $ItemVerb.DoIt() }}$itemPath ="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk"$Shell = New-Object -ComObject Shell.Application$Desktop = $Shell.NameSpace(0X0)$WshShell = New-Object -comObject WScript.Shell$itemName = Split-Path -Path $itemPath -Leaf$ItemLnk = $Desktop.ParseName($itemPath)$ItemVerbs = $ItemLnk.Verbs()Foreach($ItemVerb in $ItemVerbs) { If($ItemVerb.Name.Replace("&","") -match "Pin to Start") { $ItemVerb.DoIt() }}
    Import it and then add what you want with Set-OSCPin as described in the help. If you install this module above you could add them like this (but you'd have to change the path if you don't use Office 2016)
    Code:
    Set-OSCPin -Path= `
    "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE", `
    "C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE", `
    "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE"
    I tested it (as below) and it works for Outlook 2016 on Windows 10 AE - this is just code stripped from the link above to just add Outlook...[code]$itemPath ="C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE"

    $Shell = New-Object -ComObject Shell.Application
    $Desktop = $Shell.NameSpace(0X0)
    $WshShell = New-Object -comObject WScript.Shell

    $itemName = Split-Path -Path $itemPath -Leaf
    $ItemLnk = $Desktop.ParseName($itemPath)
    $ItemVerbs = $ItemLnk.Verbs()

    Foreach($ItemVerb in $ItemVerbs) {
    If($ItemVerb.Name.Replace("&","") -match "Pin to Start") {
    $ItemVerb.DoIt()
    }
      My Computer


  9. Posts : 1
    Windows
       #19

    proguru said:
    I found a PowerShell script on a german website that does the job:
    Powershell: Windows 10 Modern Apps an Startmenü anheften oder entfernen (Pin oder Unpin) - administrator.de


    Code:
    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 'Von "Start" lösen|Unpin from Start'} | %{$_.DoIt()}
                return "App '$appname' unpinned from Start"
            }else{
                ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'An "Start" anheften|Pin to Start'} | %{$_.DoIt()}
                return "App '$appname' pinned to Start"
            }
        }catch{
            Write-Error "Error Pinning/Unpinning App! (App-Name correct?)"
        }
    }
    
    
    
    
    
    
    Pin-App "Mail" -unpin
    Pin-App "Store" -unpin
    Pin-App "Calendar" -unpin
    Pin-App "Microsoft Edge" -unpin
    Pin-App "Photos" -unpin
    Pin-App "Cortana" -unpin
    Pin-App "Weather" -unpin
    Pin-App "Phone Companion" -unpin
    Pin-App "Twitter" -unpin
    Pin-App "Skype Video" -unpin
    Pin-App "Candy Crush Soda Saga" -unpin
    Pin-App "xbox" -unpin
    Pin-App "Groove music" -unpin
    Pin-App "movies & tv" -unpin
    Pin-App "microsoft solitaire collection" -unpin
    Pin-App "money" -unpin
    Pin-App "get office" -unpin
    Pin-App "onenote" -unpin
    Pin-App "news" -unpin

    The syntax is simply Pin-App "appname" -unpin
    Now the problem is that I can't remove all pinned apps, because I don't know their names. There are still these three shortcuts to Store remaining, iHeartRadio, Minecraft and Flipboard.

    I seem to have a problem when using the code above to remove some tiles from the start menu. I able to unpin Xbox and Solitaire, however the "appname" for Candy Crush or Bing News/Microsoft News seems to be incorrect when executing the code, and the tile is not unpinned. Here is an image:
    How to automatically (cmd/powershell script) unpin all apps in start-incorrect-appname.png
    It can also been seen that the tiles are still in fact there, and the xbox and solitaire tiles have been properly unpinned:
    How to automatically (cmd/powershell script) unpin all apps in start-tiles.png
    PLEASE HELP. I need to know the correct app names for the tile I'd like unpinned and I can't find them anywhere!
    The tiles that I want unpinned are:
    * Candy Crush Saga
    * Candy Crush Soda Saga
    * Hidden City: Hidden Objective Adventure
    * Royal Revolt 2: Tower Defense
    * Minecraft
    * Microsoft News
    * Disney Magic Kingdoms

    IT WOULD HELP SO MUCH IF SOMEONE COULD HELP ME OUT! Or if anyone can tell me how to easily find the correct "app names" for these. All these apps can be seen in the tiles on the second image. Thanks!
      My Computer


  10. Posts : 107
    Windows
       #20

    Yes, anyone who can give the names to all of the apps that appear as Live Tiles would be welcome.

    I mean the names for the 'Pin-App' Powershell script...

    Especially 'Fitbit Coach'. I can't seem to get rid of that App.

    Seems there's a bunch of potential Live Tiles at the Registry Key..:

    HKEY_USERS\USERNUMBER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\SuggestedApps

    Can anyone explain if there's a way to substitute the line of the Powershell Script:

    Code:
    ((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 Start"
    So that way the Script will parse those registry keys' location for words to add after the Pin-App command..?

    Need someone more experienced than me at Powershell who fully understands the above script...
    Last edited by Thelps; 25 Oct 2018 at 14:47.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:57.
Find Us




Windows 10 Forums