Skip to content

Instantly share code, notes, and snippets.

@CrazyLlama
Created May 29, 2018 10:38
Show Gist options
  • Save CrazyLlama/139494e32dafc45f19ab14ef9afc6e11 to your computer and use it in GitHub Desktop.
Save CrazyLlama/139494e32dafc45f19ab14ef9afc6e11 to your computer and use it in GitHub Desktop.
<#
.SYNOPSIS
Uninstall HP Data Protector if it exists
.INPUTS
Path for:
# HP Data Protector
.OUTPUTS
Console output - Currently
.NOTES
Version: 1.0
Author: Brett Calderbank
Creation Date: 24/05/2018
Purpose/Change: Initial script development
.EXAMPLE
./HP_Removal.ps1 - run script
#>
$HP_path=
If ( [System.IO.File]::Exists($HP_path) ) {
$app_array = @("HP Data Protector")
"Found:"
"HP Data Protector"
for ($i=1;$i -lt 2; $i++) {
$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match $app_array[0]
}
}
}
$app.Uninstall()
} Else {
"HP Data Protector not found"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment