Skip to content

Windows 8.1 application & tile removal using Powershell via SCCM 2012

Featured Replies

Hello,

 

I have sourced a powershell script which removes Windows 8.1 applications and the tile ( appx )

 

If I run the script manually on a client the script runs and removes the application tile from the metro screen. I have altered the script a few times to remove multiple application tiles at once and that worked fine as well.

 

I have created a program in SCCM 2012 and deployed to a client.

 

The EXECMGR log file tells me the script is received by the client and has run successfully, exit code = 0, the execution status is Success.

 

But I can still see the tile on the metro screen and the app content in c:\program files\windows apps

 

The script is as below -

 

$AppsToDelete="*Microsoft.WindowsReadingList*"
Foreach ($AppName in $AppsToDelete)
{
get-appxprovisionedpackage -online | where packagename -like $AppName | remove-appxprovisionedpackage -Online
Get-AppxPackage -name $AppName -allusers | Remove-AppxPackage
}

 

The program used by SCCM2012 to execute the script is as follows -

 

PowerShell.exe -ExecutionPolicy UnRestricted -File .\delappsreadinglistonly.ps1

 

Can anyone offer clues or pointers about what to do next ?

 

My skills with Powershell are minimal !

 

Thanks...

  • Author

Hello,

 

Thanks for the tip.

 

Yes, the script was running in the system context as is often the case with SCCM 2012.

 

Here's the change that I made.

 

For my program properties, under environment, I have changed the ' run mode ' to ' run with user's rights '

 

Looking at EXECMGR log, I see the program is executed in the user context.

 

I also see the program runs and succeeds, with exit code 0

 

That said, the Reading List tile is no longer on the start screen, but the Reading List app still appears in the Apps by name alphabetical list and can be executed.

 

Who would have thought this is such a rigmarole ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.