Feb 23 2024 06:55 AM
I've been asked to clean up some bloatware recently on our machines... so i'm getting to testing some scripting - I have some test machines to perform these tasks on.
I've done the following
- Created a collection with a query with the following information. Setting this to a limiting collection of my test machines, i see a handful of computers that are confirmed to have the app.
- This is my script i have sending to those machines - i did test it on a single machine and did remove both the APPX and the Provisioned package... i'm now onto testing the deployment via SCCM.
###########################################
#### Remove both appx and provisioned appx
###########################################
# Specify the app name
$appName = 'Bingsports'
# Remove provisioned packages based on the specified name
Get-AppxProvisionedPackage -Online |
Where-Object { $_.DisplayName -like "*$appName*" } |
ForEach-Object {
Remove-AppxProvisionedPackage -Online -PackageName $_.PackageName
}
# Remove installed packages based on the specified name
Get-AppxPackage -AllUsers "*$appName*" |
Remove-AppxPackage -AllUsers
- the deployment is set with the following switches.
powershell.exe -ExecutionPolicy Bypass -File APPXDebloat\Sports.ps1
On one of the test machines before the script ran, this script showed BOTH were installed, after the script ran, it's showing neither are installed..
Just to verify, i ran the following search for anything BING and nothing is showing up for either installed or provisioned for bingsports.
However, the machines i'm doing this on is all the same story, but the query is still showing the application there - as the app is gone, i feel like the script seems to be perfectly functional, but i'm not sure specifically where the QUERY is looking for the windows app?
Any help would be greatly appreciated!
Feb 23 2024 07:39 AM
Did look into the hardware inventory under resource explorer and still does show that it's installed. it seems like something isn't talking back and forth, but i'm unsure at this point what to do next.
Feb 23 2024 10:16 AM
now it's not showing up here - which is what i want - but it's still showing up within the collection for the query.
AND now that i've refreshed everything the collection has now reduced to 3 instead of the handful more, and the one i was looking at was gone - this was after almost 24 hours. I feel like SCCM is slow, but this is real bad.
This article was extremely helpful in looking at how the hardware scans work though
https://www.recastsoftware.com/resources/updated-troubleshoot-configmgr-hardware-inventory-issues/
I've changed the Client hardware scan to every 12 hours - but i am a bit confused, when we do the hardware scan manually, shouldn't it then rescan everything and report back to SCCM at least wthin a few hours?
Feb 23 2024 03:14 PM
Feb 29 2024 06:12 AM
When doing a hardware inventory, in the above issues i was doing a manual hardware inventory via the control panel / configuration manager action.
- doing it this way I thought would force a manual check in and update everything - but looks like it didn't work for some reason unless the one from SCCM ran.
i'll keep an eye on this though and see if it pops up again,
Feb 29 2024 07:35 AM
Mar 05 2024 07:04 AM
Mar 05 2024 08:22 AM