Often an app needs to be checked and/or uninstalled quickly or less quickly. This can be the case when a built-in app installs a component that is actually not wanted. I have made an example script here, which uses the Proactive Remediation of Endpoint Manager (MEM). I will not go into detail what MEM or Proactive Remediation is. Only, use Proactive Remediation :-)!

No matter if you use MEM or MEMCM, you will surely know the uninstall string of an app in the registry. I use this to query the details of the app. This has the advantage, if a version changes or is not 100% identical with the same parameters, that the remove still works.

So first I query the registry and search for the app in the uninstall keys. In this case I know that it was registered in the WOW6432Node. In this example it is about the “Intel Driver & Support Assistant”. As this software uses a new GUID for new versions, it make sense not to use the GUID as a parameter, only if you like to uninstall a specific version this maybe make sense.


Getting the app details. For sure you could use any property of the $appdtails to query. In my case I use the “InstallLocation” and the “DisplayName”

$appdetails = (Get-ItemProperty Registry::HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*) | Where-Object {$_.InstallLocation -eq "C:\Program Files (x86)\Intel\Driver and Support Assistant\" -and $_.DisplayName -eq "Intel Driver && Support Assistant"}

In a second detection step you can check if the app is present or not. If not,
Exit 0 is used. If available exit 1 is used. Exit 1 forces the remediation.

try {
    if ($appdetails.DisplayName -eq "Intel Driver && Support Assistant"){
    Write-Output "Intel Driver & Support Assistant is installed and will now be removed"
    Exit 1

    else {
    Write-Output "Intel Driver & Support Assistant is not installed. No action required"
    Exit 0

    $errMsg = $_.exeption.essage
    Write-Output $errMsg


Now lets go to the remediation. As soon as the detection script is terminated with exit 1, the remediation script is started.

First I start with a view parameters such as argumentlist. This details can also be found in the regkey or our variable $appdetails. Again, I check the app details:

param (

    [string]$msiname ="Intel Driver and Support Assistant Installer.msi",
    [string]$pathsw = $appdetails.InstallLocation,
    [string]$argumentlist = "/X" + $appdetails.PSChildName + " /qn" + " /noreboot",
    [string]$uninstallsource = $appdetails.InstallSource + $msiname

$appdetails = (Get-ItemProperty Registry::HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*) | Where-Object {$_.InstallLocation -eq "C:\Program Files (x86)\Intel\Driver and Support Assistant\" -and $_.DisplayName -eq "Intel Driver && Support Assistant"}

Then I create a new region block with the remediation to uninstall the app. This is done with the start-process command.

#region Uninstalling Intel Driver & Support Assistant
try {
    if ($appdetails.DisplayName -eq "Intel Driver && Support Assistant") {
    Start-Process "msiexec.exe" -ArgumentList $argumentlist -Wait -NoNewWindow
    Write-Output "Intel Driver & Support Assistant removed"
    exit 0

    Write-Output "Intel Driver & Support Assistant is not installed. No action required"
    exit 0
    $errMsg = $_.exeption.essage
    Write-Output $errMsg


Save both scripts so that they can be imported into the MEM. Under endpoint.microsoft.comReports Proactive Remediation create a new script package and use the following properties:

Name: Detect and remediate Intel Driver & Support Assistant (or similar)
Settings: Detection script – select your saved detection script
Settings: Remediation script – select your saved remediation script
Run script in 64-bit PowerShell: Yes
Assignments: Select a group, all devices and/or filters (I love filters)
Schedule: I use “Hourly”, Repeats every hour

Deploy the package to your devices. As soon as the client has made an agent update via IME, the script packages will be executed and reports back to Endpoint Analytics.

To get more insights, use the “Columns” View. This will show you the Write-Output messages we have defined in the script earlier.

For example the Pre-remediation output message:

Let me know if this was helpful or leave a comment if you have any questions.


This is a short post about how to use the serial number of your computer as computer name.

During a deployment, maybe a cloud deployment of your Windows 10/11 clients (not talking about Autopilot), you will have to define a computer name. The easiest way to get a random and never the same name, is to use the serial number.

Not all vendors do use the same style of the serial number. For example HP uses 11 characters while Fujitsu only has 10 (depends on the models as well). So let’s get started:

First we need to get the serial out of the device. I always use Get-ComputerInfo


Be aware, that there is a small bug in the Paramater BiosSerialNumber. On some Windows versions (I guess all Windows 10) the parameter is called (missing an “i”):


As a next step, you may would like to have a prefix within your computer name. If you decide to use a prefix, put that in a variable such as:

$prefix = "LDC-"

So let’s put it together using the command without a bug. This works on Windows 11. And then put the serial in to the variable $serial:

$prefix = "LDC-"
$serial = Get-ComputerInfo | Select-Object BiosSerialNumber
$serial = $serial.BiosSerialNumber

As a computer name (NetBIOS) has a limit of 15 characters, we need to shorten the serial to, let’s say, 10 characters (0, 10), starting from the beginning (0, 10):

$serial = $serial.substring(0, 10)

Now let’s put the computer name together into the $computername variable using the $prefix and the $serial variables:

$computername = $prefix + $serial

The result will looks like that (based on your hardware and serial):


Finally run the rename computer cmdlet and reboot the machine. You computer has a new name with a prefix and a part of your serial.

Rename-Computer -NewName $computername -Force -ErrorAction SilentlyContinue

Let me know what you think. Cheers!