However, I tried the script but ended up getting this error in the logs. I’ve checked the computer manually and confirmed that commands didn’t execute properly. I tried running the code as LocalSystem User as well as logged in user. See below, thanks again!
2020/11/05 02:05:28 PM
Finished success
Access is denied. Access is denied. Access is denied. Access is denied.
Hey PremJK, I was out of the office for a few days. But I’m back now. Yes I would like to help you help me I’m in California time zone, we can meet at anytime on November 13 or 14 from 8 AM to 6 PM California time. I’m also willing to meet with you guys after 6 PM, however my time might be limited. Please let me know your availability for a live session. Thanks again for your help again!
I have previously created a powershell script converted into a procedure for this very task that has so far worked well for me. Perhaps you may find it useful. I added a quick function to list all remaining install apps as was desired.
This script will auto-elevate for UAC permission purposes (which is required when dealing with appxpackages), and will output a log file to a specified location. It also uses the parameter feature of ITSM procedures so you can specify the app names and log location path at runtime (or save to the procedure as default) without needing to edit the code which is useful in reusing the script.
Here is an exported copy. Feel free to edit to fit your needs.
Rundown of Parameters
Output Log Folder - Enter the path where you wish for the log files to be stored
Example: C:\Temp\DebloatLogs
Remove Apps ("*Zune*","*Music*") comma separated - List the appx names you wish to remove. Each one must be surrounded by quotes "" and a comma must seperate each entry.
Example: "*Spotify*","*CandyCrush*","*Wallet*"
Note: You can specified wildcards by surrounding the name with *. So instead of putting "*king.com.CandyCrushFriends*", you can just use "*CandyCrush*". Any app with that name will be included and removed.
I have been able to use this successfully on many Win 10 workstations. Just run as system. I should add a disclaimer that even still my overall testing is limited, as I've only used it on one network with all similar images. Also the code formatting is a bit messy, as its something I put together quickly and haven't returned to recently, if that matters.
Perhaps you already have this resolved but I figured I’d share just in case it is helpful in any way.
@GISTeam
The name of the apps are entered under the parameters. You should not need to edit any of the code directly. Once you import the procedure, go the parameters tab as seen here:
Under RemoveWindows10Appx, enter the name(s) in the Default Value field. The values there currently are for example to show you how the format should be.
Once done save the procedure then run it on your system(s) of choice, choosing to run as system.
Just in case your still having difficulty, here is a copy of the procedure with the default parameters per-configured for app names you specified in your first post. Just import, then run against your target machines. Logs output to a text file in C:\Temp\DebloatLogs on the machine the procedure is run against, as well as under the Execution Logs tab of the procedure in the ITSM portal. 20201117-Remove-AppxPackages-Win10-GISTeam.json