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

Discus and support How to automatically (cmd/powershell script) unpin all apps in start in Windows 10 Customization to solve the problem; Hi. I would like to automatize cleaning the Windows 10's start menu from all these default pinned apps that I'm not using. I don't want to remove... Discussion in 'Windows 10 Customization' started by proguru, Sep 2, 2015.

  1. proguru Win User

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


    Hi.

    I would like to automatize cleaning the Windows 10's start menu from all these default pinned apps that I'm not using. I don't want to remove apps, only unpin from from start.

    I tried to google help, but didn't find any. There seems to be no command to pin and unpin apps in start menu. Any alternative methods? The information about the configuration of start menu must be stored somewhere, so has anyone found a way to hack this information?

    :)
     
    proguru, Sep 2, 2015
    #1
  2. Lumpy20 Win User

    Missing Windows 10 Apps, Toolbar Functions & Mouse

    Hi Debarama,

    I found another post here and ran the script below from CMD in Administrator mode. With my issues I ran this script from CMD in Administrator mode as the normal Powershell app was not available. It seems that CMD and Powershell are the same?

    From CMD in Administrator mode;

    Microsoft Windows [Version 10.0.10586]

    (c) 2015 Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>powershell

    Windows PowerShell

    Copyright (C) 2015 Microsoft Corporation. All rights reserved.

    PS C:\WINDOWS\system32> Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

    This has fixed the problem.

    Thanks for your reply,

    Regards, Keith
     
    Lumpy20, Sep 2, 2015
    #2
  3. jg116 Win User
    All Microsoft Apps have exclamation marks are greyed out and won't open

    Hi Sumit,

    This option worked partly below (it restored word and excel ony - though these are the only apps i pay for). Many are still suffering the same issue, with none of the other options working

    Run the Powershell Script to reinstall all applications

    The next step, if app troubleshooter hasn't helped is using a Powershell script that installs all applications in Windows 10.The steps for it are here:

    • Open Start Menu and type powershell:It'll automatically start searching for the program and will show PowerShell in search results.right-click on PowerShell and select "Run as Administrator" option.
    • Then Enter the following command that will reinstall all the modern apps in Windows :

     
    jg116, Sep 2, 2015
    #3
  4. How to automatically (cmd/powershell script) unpin all apps in start

    I want to do this too and I remember reading of a way, however I might be mistaken. Hopefully, someone will respond and let us know.
     
    nosecureboot, Sep 3, 2015
    #4
  5. proguru Win User
    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[/quote]
    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.


    How to automatically (cmd/powershell script) unpin all apps in start [​IMG]
     
    proguru, Nov 16, 2015
    #5
  6. jackized Win User
    Thank you proguru. Here is the same thing in English.

    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 Start"
    }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?)"
    }
    }

    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 "Music" -unpin
    Pin-App "xbox" -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
    Pin-App "Mail" -pin
    Pin-App "Store" -pin
    Pin-App "Calendar" -pin
    Pin-App "Microsoft Edge" -pin
    Pin-App "Photos" -pin
    Pin-App "Cortana" -pin
    Pin-App "Weather" -pin
    Pin-App "Phone Companion" -pin
    Pin-App "Music" -pin
    Pin-App "xbox" -pin
    Pin-App "movies & tv" -pin
    Pin-App "microsoft solitaire collection" -pin
    Pin-App "money" -pin
    Pin-App "get office" -pin
    Pin-App "onenote" -pin
    Pin-App "news" -pin
     
    jackized, Apr 24, 2016
    #6
  7. BryanP Win User
    This powershell script is exactly what I need to solve a problem here at work, but I'm having problems testing it. I need to run it against PCs to remove the shortcuts to install Flipboard, Minecraft and Adobe Photoshop Express. I've taken the above, remmed out all of the Pin/Unpin statements that came with it, and added three lines to unpin the shortcuts mentioned and I get the errors shown below. It's acting as if the app name isn't correct, but as far as I can tell it is.


    How to automatically (cmd/powershell script) unpin all apps in start [​IMG]
     
    BryanP, May 4, 2016
    #7
  8. syntax53 Win User

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

    This tells me, "App 'Microsoft Edge' unpinned from Start" ... but it's not *Sad
     
    syntax53, Jul 19, 2016
    #8
  9. syntax53 Win User
    Nevermind, I see the script was designed to unpin from Start, not taskbar. Simply replacing "unpinned from Start" to "unpinned from taskbar" works. Spent many hours on this searching all over the internet. This is the best solution as it does not require killing explorer.exe!

    Here is an altered version of the script above:

    Code: function Pin-App ([string]$appname, [switch]$unpin, [switch]$start, [switch]$taskbar, [string]$path) { if ($unpin.IsPresent) { $action = "Unpin" } else { $action = "Pin" } if (-not $taskbar.IsPresent -and -not $start.IsPresent) { Write-Error "Specify -taskbar and/or -start!" } if ($taskbar.IsPresent) { try { $exec = $false if ($action -eq "Unpin") { ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Unpin from taskbar'} | %{$_.DoIt(); $exec = $true} if ($exec) { Write "App '$appname' unpinned from Taskbar" } else { if (-not $path -eq "") { Pin-App-by-Path $path -Action $action } else { Write "'$appname' not found or 'Unpin from taskbar' not found on item!" } } } else { ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Pin to taskbar'} | %{$_.DoIt(); $exec = $true} if ($exec) { Write "App '$appname' pinned to Taskbar" } else { if (-not $path -eq "") { Pin-App-by-Path $path -Action $action } else { Write "'$appname' not found or 'Pin to taskbar' not found on item!" } } } } catch { Write-Error "Error Pinning/Unpinning $appname to/from taskbar!" } } if ($start.IsPresent) { try { $exec = $false if ($action -eq "Unpin") { ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Unpin from Start'} | %{$_.DoIt(); $exec = $true} if ($exec) { Write "App '$appname' unpinned from Start" } else { if (-not $path -eq "") { Pin-App-by-Path $path -Action $action -start } else { Write "'$appname' not found or 'Unpin from Start' not found on item!" } } } else { ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Pin to Start'} | %{$_.DoIt(); $exec = $true} if ($exec) { Write "App '$appname' pinned to Start" } else { if (-not $path -eq "") { Pin-App-by-Path $path -Action $action -start } else { Write "'$appname' not found or 'Pin to Start' not found on item!" } } } } catch { Write-Error "Error Pinning/Unpinning $appname to/from Start!" } } } function Pin-App-by-Path([string]$Path, [string]$Action, [switch]$start) { if ($Path -eq "") { Write-Error -Message "You need to specify a Path" -ErrorAction Stop } if ($Action -eq "") { Write-Error -Message "You need to specify an action: Pin or Unpin" -ErrorAction Stop } if ((Get-Item -Path $Path -ErrorAction SilentlyContinue) -eq $null){ Write-Error -Message "$Path not found" -ErrorAction Stop } $Shell = New-Object -ComObject "Shell.Application" $ItemParent = Split-Path -Path $Path -Parent $ItemLeaf = Split-Path -Path $Path -Leaf $Folder = $Shell.NameSpace($ItemParent) $ItemObject = $Folder.ParseName($ItemLeaf) $Verbs = $ItemObject.Verbs() if ($start.IsPresent) { switch($Action){ "Pin" {$Verb = $Verbs | Where-Object -Property Name -EQ "&Pin to Start"} "Unpin" {$Verb = $Verbs | Where-Object -Property Name -EQ "Un&pin from Start"} default {Write-Error -Message "Invalid action, should be Pin or Unpin" -ErrorAction Stop} } } else { switch($Action){ "Pin" {$Verb = $Verbs | Where-Object -Property Name -EQ "Pin to Tas&kbar"} "Unpin" {$Verb = $Verbs | Where-Object -Property Name -EQ "Unpin from Tas&kbar"} default {Write-Error -Message "Invalid action, should be Pin or Unpin" -ErrorAction Stop} } } if($Verb -eq $null){ Write-Error -Message "That action is not currently available on this Path" -ErrorAction Stop } else { $Result = $Verb.DoIt() } } Pin-App "Microsoft Edge" -unpin -taskbar[/quote] note: Even though I have built in ways of pinning apps to the taskbar to this script, it is not functional as MS has removed the "Pin to taskbar" verbs, and I cannot find a scriptable workaround. Ref: PSA: Win10 removes support for scripting verb - Windows 10 - Spiceworks
     
    syntax53, Jul 19, 2016
    #9
  10. GeneralG Win User
    Had the same problem as BryanP. The script would not remove all of the live tiles. No matter what I tried, especially annoying ones like Twitter and Candy Crush Soda Sage were always left behind.

    A slight modification to the script allowed me to unpin tiles indiscriminately. To do this, remove the "-eq $appname" from the 7th line, so it reads like so:

    ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name}).Verbs() | ?{$_.Name.replace('&','') -match 'Von "Start" lösen|Unpin from Start'} | %{$_.DoIt()}

    Unfortunately, even this technique failed to remove a handful of tiles. I was even more baffled because the apps that remained were not installed on the device. Finally, I realized that the only way for an app to show up in the CLSID list used by the powershell command is for them to be installed on the computer. Since I had uninstalled all the bloatware from my image, I am now unable to quickly remove the live tiles for said bloatware because Windows 10 thinks I need to use Twitter and play Candy Crush so badly that it brings them back from the dead every time I image a machine or create a new account.

    I fail to understand why there is no control panel option to simply turn off live tiles in one fell swoop.

    If any knows a better solution to automate this process please share it. There has to be a folder hidden somewhere in ProgramData or AppData that the live tiles are referencing.
     
    GeneralG, Sep 28, 2016
    #10
  11. lx07 Win User
    It is in %localappdata%\TileDataLayer\Database but I don't know the structure.

    What you can do though is Import-StartLayout into a mounted windows image or define the start layout in group policy if either of these approaches would help...


    How to automatically (cmd/powershell script) unpin all apps in start [​IMG]
     
  12. GeneralG Win User
    Thanks lx07,

    After further research, I came across the same solution on my own. The following link does a fantastic job of explaining Start Layout customization:

    https://winpeguy.wordpress.com/2015/...ltlayouts-xml/

    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 also still need to try including the DefaultLayouts.xml in my image and seeing if I can get it to apply to the Administrator account.

    Also I saw the file you referenced "%localappdata%\TileDataLayer\Database" but I am unsure how to use it. Modifying the DefaultLayouts.xml seems like the way to go since that is, more or less, what using powershell to import a start layout does according to the article I linked.
     
    GeneralG, Sep 29, 2016
    #12
  13. Sje1492 Win User

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

    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
     
    Sje1492, Nov 14, 2016
    #13
  14. lx07 Win User
    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"[/quote] 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() } }[/quote]
     
  15. 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 [​IMG]


    What script could I add to remove them?
     
    irrefutable14, Dec 19, 2016
    #15
Thema:

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

Loading...
  1. How to automatically (cmd/powershell script) unpin all apps in start - Similar Threads - automatically cmd powershell

  2. Can't start cmd & powershell as admin

    in Windows 10 Gaming
    Can't start cmd & powershell as admin: I can no longer start the cmd and powershell as administrator, even by right-clicking to start it as administrator. I tried to do a disk scan and nothing changed, I tried to contact the assistance and I also did the repair-update and also this time nothing changed. Thank you...
  3. Can't start cmd & powershell as admin

    in Windows 10 Software and Apps
    Can't start cmd & powershell as admin: I can no longer start the cmd and powershell as administrator, even by right-clicking to start it as administrator. I tried to do a disk scan and nothing changed, I tried to contact the assistance and I also did the repair-update and also this time nothing changed. Thank you...
  4. how to connect to Wi-Fi with cmd/powershell script

    in Windows 10 Gaming
    how to connect to Wi-Fi with cmd/powershell script: i'm trying to create command to connect to my Wi-Fi via automation script, however my Wi-Fi demand user name and password to connectWindows Security Login pop up when connecting to wireless NetworkI tried to Add a new wireless profile to the system: netsh wlan add profile...
  5. how to connect to Wi-Fi with cmd/powershell script

    in Windows 10 Software and Apps
    how to connect to Wi-Fi with cmd/powershell script: i'm trying to create command to connect to my Wi-Fi via automation script, however my Wi-Fi demand user name and password to connectWindows Security Login pop up when connecting to wireless NetworkI tried to Add a new wireless profile to the system: netsh wlan add profile...
  6. PowerShell script

    in Windows 10 Support
    PowerShell script: The code below tests a series of IPs in a txt file.The result is as follows and is written in a txt file. 19.191.12.161 - online 19.191.12.162 - offline 19.191.12.163 - offline 19.191.12.164 - offline 19.191.12.165 - offline also see the scrennshot Code: $Output= @()$GetIP =...
  7. Customise OS with PowerShell script to remove ALL Apps.

    in Windows 10 Customization
    Customise OS with PowerShell script to remove ALL Apps.: I have been playing around with customising an Win 10 Pro ISO for installation. I basically want to get rid of pretty much ALL the Apps besides about three. For customisation, I have tried out WinReducer, MSMG, and WinToolkit, all of which allowed various levels of...
  8. How can cmd script check for powershell environment?

    in Windows 10 Support
    How can cmd script check for powershell environment?: I can execute script abc.cmd in either a command prompt or powershell environment/window. Can it determine the environment in which it runs? Powershell 5, W10Pro64, 1803 Thank you and a Merry Christmas. 124044
  9. CMD and PowerShell

    in Windows 10 BSOD Crashes and Debugging
    CMD and PowerShell: Hi all, I run Windows 10, v 1803. Clicking Start, typing CMD, there is only "Command Prompt (desktop application)". Win key + X shows "Windows PowerShell" and "Windows PowerShell (Admin)". If after Win key+R I choose Windows PowerShell" pops up a message: Same with...
  10. Can't unpin app from Start

    in Windows 10 Software and Apps
    Can't unpin app from Start: Hello, I can't unpin an app from the Start menu Here's a gif of what (doesn't) happen [img] 12581

Users found this page by searching for:

  1. unpin apps from start all users powershell

    ,
  2. script to unpin apps to start menu windows 10

    ,
  3. command to unpin all pinned start menu apps

    ,
  4. unpin all apps from start menu poewrshell script,
  5. default apps unpin script,
  6. default apps unpin powershell,
  7. powershell unpin from start menu,
  8. unpin from start powershell,
  9. syspin to unpin apps cmd