How to pin and unpin all application from Windows 10

Windows PowerShell is a shell program developed by Microsoft to automate tasks and configuration management. This powerful shell is based on the .NET framework and it includes a command-line shell and a scripting language. PowerShell was made open-source and cross-platform on 18 August 2016 after initially being a Windows component only. Anyone could now develop commands to use with PowerShell.

Windows PowerShell offers two ways of executing your commands. The first is the use of cmdlets (lightweight command used in the Windows PowerShell environment command line) and the second is the use of scripts that you can save and run later or on another computer. These scripts are similar to command prompt batch scripts.

Since windows 8, Microsoft has offered a more interactive way to customize your start menu. In Windows 10, you can pin and unpin application tiles from your start menu. If you are going to do this in more than one computer, then this task is going to be overwhelming. Automation is what you will need. This article is going to show you how you can use Windows PowerShell to pin and unpin tiles from Windows 10.

Method 1: Pin and Unpin default Windows applications using PowerShell script

If you would like to automate cleaning the Windows 10’s start menu from all the default pinned apps that you are using follow these steps. Remember that this won’t remove the apps; only unpin them from the start. This will work only for apps that are installed and not links to the store. You will also need to open Windows PowerShell in its Graphical User Interface window as an administrator.

  1. Press the Windows key to open the start menu
  2. Type ‘PowerShell’ to search for the application
  3. In the list that appears, right click on ‘PowerShell ISE’ to open the PowerShell environment in a graphical interface. You will see three windows stacked on top of each other; the script window (shows the title of your new script, untitled.psm1 in this case), the prompt window (written PS C:\Windows\system32>) and the debugging window (without a title).
  4. Copy the script you need below and paste it into the script window (it should be the topmost window, or on the right hand side). The general syntax is ‘Pin-App “App Name” –unpin’ to unpin apps or ‘Pin-App “App Name” –pin’ to pin apps. Remove or add the apps you want to the list at the bottom.
  5. You can download the Script to Unpin default Apps from here. This will also unpin apps from the store.
  6. You can download the Script to pin default apps from here. This will also pin apps from the store.
  7. To run the script, click on the Run Script button (play button) on toolbar (if not available, you can set its visibility from the view menu)
  8. To save the script, go to file > Save As. Choose a location and type the name of your file in the window that appears. Click Save
  9. To run your saved script on a computer without having to reopen Windows PowerShell, right click on the script file you saved, and choose ‘Run with PowerShell’

These scripts will work for most of Windows 10 apps, but it will not work if your apps are not installed (i.e., are just links to the store) you will need to turn off consumer experience in the group policy here “Computer Configuration > Policies > Administrative Templates > Windows Components > Cloud Content > Turn off Microsoft consumer experiences.” This will be set as default for new accounts in your computer.

Method 2: Pin apps on Windows applications using PowerShell script

Method 1 offers a way to only pin apps that come with windows or are downloaded from the store. To pin apps like Microsoft Office Applications, Outlook or games using a PowerShell script, you will need to point the script to the path of the application executable. Here is what you will need to do in the Windows PowerShell Graphical User Interface window as an administrator. You will need at least version 3 of PowerShell to run these scripts.

  1. Press the Windows key to open the start menu
  2. Type ‘PowerShell’ to search for the application
  3. In the list that appears, right click on ‘PowerShell ISE’ to open the PowerShell environment in a graphical interface. You will see three windows stacked on top of each other; the script window (shows the title of your new script, untitled.ps1 in this case), the prompt window (written PS C:\Windows\system32>) and the debugging window (without a title).
  4. Copy the script you need below and paste it into the script window (it should be the topmost window, or on the right hand side). The general syntax is ‘Set-OSCPin -Path’ to pin apps; where ‘path’ is the actual path of your app. Add the apps you want to the list at the bottom.
  5. You can download the Script to pin any app you want from here
  6. To run the script, click on the Run Script button (play button) on toolbar (if not available, you can set its visibility from the view menu)
  7. To save the script, go to file > Save As. Choose a location and type the name of your file in the window that appears. Click Save
  8. To run your saved script on a computer without having to reopen Windows PowerShell, right click on the script file you saved, and choose ‘Run with PowerShell’
  9. You can also run the scripts above from the PowerShell command line environment.
  10. Press the Windows key to open the start menu
  11. Type ‘PowerShell’ to search for the application
  12. In the list that appears, right click on ‘PowerShell’ and run as an administrator
  13. In the PowerShell environment type ‘Import-module filepathofmodule’ e.g “Import-module C:\Users\User1\Downloads\PSModule.psm1”
  14. This will load your module, and all you will have to do is type the app you want to add or remove by using the syntaxes provided.
  15. Method 2 offers a help menu that you can access by typing “Get-Help Set-OSCPin –Full”.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Comments

10
    PS
    PSGuy Jul 27, 2017

    There is a bug in your script. The condition if it was sucssefully should be $flag -eq 1 not $flag=1

    Reply
      KA
      K. Arrows Author Aug 5, 2017

      Did the change work for you?

    ES
    Evan Sullivan Jan 15, 2018

    Is there a way to control which group the pin goes to? And remote users

    ER
    EroldRu Nov 28, 2018

    Not working for me. Says app is unpinned, while it still exists in the start menu. Maybe I missed something?

    RI
    riguy Apr 30, 2019

    This script will remove all existing Pins from OOB win10
    I run it once in a user GPO

    # Remove ALL current Apps from Start tile Pin location
    # Remove all $AppNames String array from taskbar Pin location
    $ComObj = (New-Object -Com Shell.Application).NameSpace(‘shell:::{4234d49b-0245-4df3-b780-3893943456e1}’)
    $AppNames = “edge|stor|mai”
    #use the match to limit the apps removed from start tiles
    #$ComObjItem = $ComObj.Items() | ?{$_.Name -match $AppNames}
    $ComObjItem = $ComObj.Items()
    ForEach ($Obj in $ComObjItem) {
    Write-Host “$(“Checking ” + $Obj.name)” -ForegroundColor Cyan
    ForEach ($Verb in $Obj.Verbs()) {
    Write-Host “$(“Verb: ” + $Verb.name)” -ForegroundColor white
    If (($Verb.name -match ‘Un.*pin from Start’)) {
    Write-Host “$(“Ok ” + $Obj.name + ” contains ” + $Verb.name)” -ForegroundColor Red
    $Verb.DoIt()
    }
    If (($Verb.name -match ‘Un.*pin from tas&kbar’) -And ($Obj.name -match $AppNames)) {
    Write-Host “$(“Ok ” + $Obj.name + ” contains ” + $Verb.name)” -ForegroundColor Red
    $Verb.DoIt()
    }
    }#End Foreach Object.Verb
    } #End Foreach object

    Reply
      SW
      Shane Warren Author Sep 13, 2019

      Thank you for sharing your script

    JC
    jc777 Jul 2, 2019

    It worked for me at least majority of the tiles have been unpinned. For some reason I can’t see to get 4 games unpinned. I have worded them correctly, but still doesn’t want to unpin them.

      SW
      Shane Warren Author Sep 10, 2019

      Are these Microsoft Games?

    SW
    Shane Warren Author Sep 30, 2019

    Can you elaborate? the script will unpin the applications from the start.

    SG
    Shulim Goldring Sep 25, 2020

    None of these worked for me, but this did:
    Right-click Quick access, and choose Open in New Window.Select all folder icons in the window.Right-click one of them, and choose Unpin from Quick Access.

    Reply