Skip to main content

Hi everyone,

Trying to create a simple worklet to uninstall the Microsoft Copilot app, but not the Microsoft365 Copilot app (2 different apps).   This one line scripts locally, but doesn’t work on Automox.  When running it, I simply get this message: {"args":"","response":"[\"0\",null,null]"}

 Any thoughts? From my testing, the Gep-AppxPackage is the only command that works for the Microsoft Copilot app.

Hey Steve,

 

Without any additional switches, Get-AppxPackage only checks for software installed on the user account executing the script. When running a Worklet, the device(s) will execute the script as NT Authority/SYSTEM. I would recommend including the “-ALLUSERS” switch to your Get-AppxPackage to ensure the Worklet is able to check for software installed for all users on the device(s). 

 

The Automox Worklet Catalog has a Worklet you could repurpose as well:
Windows - Software Lifecycle - Uninstall Targeted Microsoft Store Apps

 

I hope this helps! Please let me know if you’re still having any difficulty!

 


@AX-CoreyMesenbring ah that is super helpful.  Okay so just one more clarifying question - even though the script as the All Users switch in it, I can still just target one device for testing, correct?  It won’t remove it for all users is what I am asking.


Nevermind, I see what you mean now.  Silly question!


@AX-CoreyMesenbring wanted to follow back up here.  So the script is working without errors, including saying the app was uninstalled, but Microsoft Copilot is still remaining on the device.  Is there any place I can check for logs?  I am thinking the Automox agent logs may not show any errors since the script is not reporting.