Created
May 29, 2018 10:38
-
-
Save CrazyLlama/139494e32dafc45f19ab14ef9afc6e11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.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