Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Scripts

Share this post:

HP debloat script

Manual run version

Remediation script version

# List of software to check
$softwareList = @(
    "HP Wolf Security",
    "HP Wolf Security - Console",
    "Poly Lens",
    "HP Sure Run Module",
    "HP Sure Recover",
    "HP Security Update Service",
    "HPSureShieldAI",
    "HP Client Security Manager",
    "HP Sure Click",
    "HP Sure Run"
)

# Create the 'C:\install' folder if it does not exist
$installFolderPath = "C:\install"
if (-not (Test-Path -Path $installFolderPath)) {
    New-Item -ItemType Directory -Path $installFolderPath | Out-Null
}

# Check if any software is installed
$installedSoftware = Get-WmiObject -Class Win32_Product -ErrorAction SilentlyContinue | Where-Object { $softwareList -contains $_.Name }

if ($installedSoftware) {
    foreach ($software in $installedSoftware) {
        "$($software.Name) is installed on the computer." | Out-File -FilePath "$installFolderPath\HP_Bloatware.txt" -Append
    }
    exit 1
}
else {
    foreach ($software in $softwareList) {
        "$software is not installed on the computer." | Out-File -FilePath "$installFolderPath\HP_Bloatware.txt" -Append
    }
    exit 0
}

exit 0
# List of software to check
$softwareList = @(
    "HP Wolf Security",
    "HP Wolf Security - Console",
    "Poly Lens",
    "HP Sure Run Module",
    "HP Sure Recover",
    "HP Security Update Service",
    "HPSureShieldAI",
    "HP Client Security Manager",
    "HP Sure Click",
    "HP Sure Run"
)

# Create the 'C:\install' folder if it does not exist
$installFolderPath = "C:\install"
if (-not (Test-Path -Path $installFolderPath)) {
    New-Item -ItemType Directory -Path $installFolderPath | Out-Null
}

# Check if any software is installed
$installedSoftware = Get-WmiObject -Class Win32_Product -ErrorAction SilentlyContinue | Where-Object { $softwareList -contains $_.Name } 

$removedSoftware = @()

if ($installedSoftware) {
    foreach ($software in $installedSoftware) {
        # "$($software.Name) is installed on the computer. Removing..." | Out-File -FilePath "$installFolderPath\HP_Bloatware.txt" -Append
        $software.Uninstall()
        $removedSoftware += $software.Name
    }
    # $removedSoftware | ForEach-Object { "removed: $_" } | Out-File -FilePath "$installFolderPath\HP_Bloatware.txt" -Append
}
else {
    # "No HP Bloatware found on your PC" | Out-File -FilePath "$installFolderPath\HP_Bloatware.txt" -Append
    exit 0
}

if ($removedSoftware.Count -eq $softwareList.Count) {
    # "All applications were successfully removed." | Out-File -FilePath "$installFolderPath\HP_Bloatware.txt" -Append
    exit 0
}
else {
    # "Some applications were not removed." | Out-File -FilePath "$installFolderPath\HP_Bloatware.txt" -Append
    exit 0
}

exit 0
# Check if the file exists
if (Test-Path "C:\Program Files (x86)\InstallShield Installation Information\{6468C4A5-E47E-405F-B675-A70A70983EA6}\Setup.exe") {
    # Write the message to the file
    # "HP Connection Optimizer is installed on the computer" | Out-File -FilePath "C:\install\HP_Bloatware_CO.txt"
    # Exit with code 1 (for rememdiation script usage in Itnue)
    exit 1
} else {
    # "HP Connection Optimizer is not installed on the computer" | Out-File -FilePath "C:\install\HP_Bloatware-CO.txt"
    # Exit with code 0 (for rememdiation script usage in Itnue)
    exit 0
}
exit 0


# silently uninstall HP Connection Optimizer

# create c:\install folder if it does not exist
$installFolderPath = "C:\install"
if (-not (Test-Path -Path $installFolderPath)) {
    New-Item -ItemType Directory -Path $installFolderPath | Out-Null
}


If (Test-Path "C:\Program Files (x86)\InstallShield Installation Information\{6468C4A5-E47E-405F-B675-A70A70983EA6}\Setup.exe") {
    $optimizerUninstallAnswer = "[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{6468C4A5-E47E-405F-B675-A70A70983EA6}-DlgOrder]
Dlg0={6468C4A5-E47E-405F-B675-A70A70983EA6}-SdWelcomeMaint-0
Count=3
Dlg1={6468C4A5-E47E-405F-B675-A70A70983EA6}-MessageBox-0
Dlg2={6468C4A5-E47E-405F-B675-A70A70983EA6}-SdFinishReboot-0
[{6468C4A5-E47E-405F-B675-A70A70983EA6}-SdWelcomeMaint-0]
Result=303
[{6468C4A5-E47E-405F-B675-A70A70983EA6}-MessageBox-0]
Result=6
[Application]
Name=HP Connection Optimizer
Version=2.0.18.0
Company=HP Inc.
Lang=0409
[{6468C4A5-E47E-405F-B675-A70A70983EA6}-SdFinishReboot-0]
Result=1
BootOption=0
"
    $optimizerUninstallAnswer | Out-File $env:TEMP\optimizer.iss
    $arguments = "/s /f1`"$env:Temp\optimizer.iss`" /f2`"$env:TEMP\Uninstall.log`""
    Start-Process "C:\Program Files (x86)\InstallShield Installation Information\{6468C4A5-E47E-405F-B675-A70A70983EA6}\Setup.exe" -ArgumentList $arguments -PassThru -Wait
    "Removing HP Connection Optimizer from the computer." | Out-File -FilePath "$installFolderPath\HP_Bloatware_CO.txt" -Append
    exit 0
}
else {
    "Removal found HP Connection Optimizer is not installed on the computer." | Out-File -FilePath "$installFolderPath\HP_Bloatware_CO.txt" -Append
    exit 0
}
    
exit 0

Corporate Device Identifiers

$manufacturer = (Get-CimInstance -ClassName Win32_ComputerSystem).Manufacturer
$model = (Get-CimInstance -ClassName Win32_ComputerSystem).Model
$serialNumber = (Get-CimInstance -ClassName Win32_BIOS).SerialNumber

"$manufacturer,$model,$serialNumber"

Share this post: