Skip to content

Instantly share code, notes, and snippets.

<#
.NOTES
Author : Chris Titus @christitustech
Runspace Author: @DeveloperDurp
GitHub : https://github.com/ChrisTitusTech
Version : 26.02.18
#>
param (
[switch]$Debug,
$Unpin = ((New-Object -ComObject Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() |
Where-Object { $_.Name -eq "Microsoft Edge" }).Verbs() |
Where-Object { $_.Name.replace('&', '') -match 'Unpin from taskbar'
}
$Unpin.DoIt()
$Paths =
'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge',
'HKLM:\SYSTEM\CurrentControlSet\Services\edgeupdatem',
'HKLM:\SYSTEM\CurrentControlSet\Services\edgeupdate',
# This is an example of how to use the Windows Runtime (C#)
# Windows.Management.Deployment API in PowerShell to remove AppX packages,
# which is significantly faster than using Remove-AppxPackage.
# this wont work in powershell 7+
$Packages =
'Microsoft.WindowsCalculator',
'Microsoft.WindowsCamera',
'Microsoft.WindowsAlarms',
'Microsoft.WindowsFeedbackHub',