diff --git "a/Fun\\Random/Interactive Prompt to Uninstall a Program.ps1" "b/Fun\\Random/Interactive Prompt to Uninstall a Program.ps1" new file mode 100644 index 0000000..c6c379a --- /dev/null +++ "b/Fun\\Random/Interactive Prompt to Uninstall a Program.ps1" @@ -0,0 +1,8 @@ +Get-WmiObject -Class Win32_Product | Select-Object -Property Name | Out-GridView + +[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') +$Program = [Microsoft.VisualBasic.Interaction]::InputBox('Please enter the name of the program you wish to uninstall', 'Uninstall Program') + +$MyApp = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "$Program" } + +$MyApp.Uninstall() \ No newline at end of file