[PowerShell] 移除(unpin)所有Windows 10 安裝好後的預設Start Tiles

2017-07-19

最近一直在裝機器,因為用不習慣紅色框框這一區,每一次我都要一個一個把按下右鍵unpinimage

這也不是我獨創的,這是改過 這個網站教學 然後發表的步驟文,原來這世界問題不是只有我一個 原文連結: https://www.tenforums.com/customization/21002-how-automatically-cmd-powershell-script-unpin-all-apps-start.html

1. 到那個網站下載這一段程式碼並且存成clear.ps1 請注意副檔名最後那個是數字1 不是小寫的L
內文:

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 "Maps" -unpin
Pin-App "Paint 3D" -unpin
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" -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

這裡面我有做部分修改。

2. 開啟命令提示字元,記得用系統管理員身分執行以防萬一 ,進入powershell 並且輸入

 Set-ExecutionPolicy RemoteSigned

之後就是執行剛剛的 clear.ps1 指令

.\clear.ps1

之後他就會開始移除,遇到沒有的他會出現錯誤,不過沒關係讓他跑完

image

是不是就乾乾淨淨了,如果有殘存的,那就自己在手動清掉,這邊提供給需要的人。


當麻許的超技八 2014 | Donma Hsu Design.