Run Powershell script as Admin to REMOVE unwanted Win10 Apps

Hello,
Title kind of speaks for itself but here is more detail of the issue i am having. I have a basic powershell script that runs through and removes a list of unwanted win10 apps per user… manually. It only works when i run the powershell script as an admin. I want to be able to automate this so i can send the BigFix job to run in the background but not prompt for admin credentials. Any help with this would be appreciated.

Thanks

BigFix runs as the system account by default which should have enough rights to work.

Are you referring to a UAC prompt?

Correct, I am trying to avoid the credentials having to be typed into the UAC prompt. I want this to run without any action needed from the end user.

If you are having to run this individually as each user, your options may be limited.

I presume tgese are Windows Store apps? There are scripts, both Powershell and DISM commands, I believe, where a single account (such as the SYSTEM account used by BigFix) can remove store apps for all users in one go.

I’ll need some time to find a reference, but the capability is out there and I thino that would better serve your needs.

This reference should help.

1 Like

Helllo … you will not be able to remove them over the system account…because they only show installed over local and domain accounts…I had this problem before.

You should customize you MDT bundle, you need to add this script on the MDT task sequence and upload the cutomized bundle and associate it with the image that you want.

How would I go about removing those apps on machines that have already been imaged and deployed?

I definitely see what you are saying by adding it to the MDT task sequence so in the future they would be removed right away but my issue more revolves around trying to remove those apps from all the deployed machines quietly in the background without having to reimage them all.

I appreciate the reply Jason. That is what my script basically entails. It just requires an admin power shell window to run but I can’t get one started without the UAC prompt. Disabling UAC is not an option.

Right, but if you just let Bigfix run it like most installers, as LocalSystem rather than a user account, and dispkay no interface at all, I’d expect it to work.

So by creating a bigfix action script to then call the .ps1 file it should kick off the removal of the apps?