Skip to content

Instantly share code, notes, and snippets.

@iilei
Created August 2, 2019 05:40
Show Gist options
  • Save iilei/cb72f614e4862218d849789e19d3f96a to your computer and use it in GitHub Desktop.
Save iilei/cb72f614e4862218d849789e19d3f96a to your computer and use it in GitHub Desktop.
Drop Tiles frowm Windows start menu
Add-Type -AssemblyName System.Windows.Forms
# show the MsgBox:
$result = [System.Windows.Forms.MessageBox]::Show('Do you want to clean up all tiles?', 'Warning', 'YesNo', 'Warning')
# check the result:
if ($result -eq 'Yes')
{
(New-Object -Com Shell.Application).
NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').
Items() |
%{ $_.Verbs() } |
?{$_.Name -match '.*Von "Start" l.*sen'} |
%{$_.DoIt()}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment