How to pin and unpin all application from Windows 10

Originally published at: 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…

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

Thank you for sharing your script

Are these Microsoft Games?

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.

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 " + $” -ForegroundColor Cyan
ForEach ($Verb in $Obj.Verbs()) {
Write-Host "$(“Verb: " + $” -ForegroundColor white
If (($ -match ‘Un.*pin from Start’)) {
Write-Host "$(“Ok " + $ + " contains " + $” -ForegroundColor Red
If (($ -match ‘Un.*pin from tas&kbar’) -And ($ -match $AppNames)) {
Write-Host "$(“Ok " + $ + " contains " + $” -ForegroundColor Red
}#End Foreach Object.Verb
} #End Foreach object

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

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

Did the change work for you?

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