RiffRaff Posted January 9, 2020 Posted January 9, 2020 Hi Is there an easy way to remove Windows 10 apps for ALL users? One of our teachers is constantly moaning about kids being on Solitaire etc. I have tried the following Powershell commands: Get-AppxPackage *solitairecollection* | Remove-AppxPackage Get-AppxPackage -allusers *Microsoft.MicrosoftSolitaireCollection_4.4.6132.0_x64__8wekyb3d8bbwe*| Remove-AppxPackage I have also tried Get-AppxPackage -AllUsers | Remove-AppxPackage which I think should remove all Windows apps? It seems to delete for me when logged on as admin, but when I log back in with student test accounts it's back. We are running Windows 10 Pro build 1903 Cheers
tmoon-mint Posted January 9, 2020 Posted January 9, 2020 I believe you will want to use Get-AppxProvisionedPackage to remove an app for all users. From my understanding running get-appxpackage will remove it for all existing users but any new ones will still have Solitaire installed at first login. 2
BOOT Posted January 9, 2020 Posted January 9, 2020 Don't use Remove-AppxPackage. It will break other apps. Use Remove-AppxProvisionedPackage. This stops the app being auto-installed on first\subsequent logons. 3
2097 Posted January 10, 2020 Posted January 10, 2020 We use the code below , We actually use it as part of the task sequence when first installing. # *************************************************************************** # # File: RemoveApps.ps1 # # Version: 1.2 # # Author: Michael Niehaus # # Purpose: Removes some or all of the in-box apps on Windows 8, Windows 8.1, # or Windows 10 systems. The script supports both offline and # online removal. By default it will remove all apps, but you can # provide a separate RemoveApps.xml file with a list of apps that # you want to instead remove. If this file doesn't exist, the # script will recreate one in the log or temp folder, so you can # run the script once, grab the file, make whatever changes you # want, then put the file alongside the script and it will remove # only the apps you specified. # # Usage: This script can be added into any MDT or ConfigMgr task sequences. # It has a few dependencies: # 1. For offline use in Windows PE, the .NET Framework, # PowerShell, DISM Cmdlets, and Storage cmdlets must be # included in the boot image. # 2. Script execution must be enabled, e.g. "Set-ExecutionPolicy # Bypass". This can be done via a separate task sequence # step if needed, see http://blogs.technet.com/mniehaus for # more information. # # ------------- DISCLAIMER ------------------------------------------------- # This script code is provided as is with no guarantee or waranty concerning # the usability or impact on systems and may be used, distributed, and # modified in any way provided the parties agree and acknowledge the # Microsoft or Microsoft Partners have neither accountabilty or # responsibility for results produced by use of this script. # # Microsoft will not provide any support through any means. # ------------- DISCLAIMER ------------------------------------------------- # # *************************************************************************** # --------------------------------------------------------------------------- # Initialization # --------------------------------------------------------------------------- if ($env:SYSTEMDRIVE -eq "X:") { $script:Offline = $true # Find Windows $drives = get-volume | ? {-not [string]::IsNullOrWhiteSpace($_.DriveLetter) } | ? {$_.DriveType -eq 'Fixed'} | ? {$_.DriveLetter -ne 'X'} $drives | ? { Test-Path "$($_.DriveLetter):\Windows\System32"} | % { $script:OfflinePath = "$($_.DriveLetter):\" } Write-Verbose "Eligible offline drive found: $script:OfflinePath" } else { Write-Verbose "Running in the full OS." $script:Offline = $false } # --------------------------------------------------------------------------- # Get-LogDir: Return the location for logs and output files # --------------------------------------------------------------------------- function Get-LogDir { try { $ts = New-Object -ComObject Microsoft.SMS.TSEnvironment -ErrorAction Stop if ($ts.Value("LogPath") -ne "") { $logDir = $ts.Value("LogPath") } else { $logDir = $ts.Value("_SMSTSLogPath") } } catch { $logDir = $env:TEMP } return $logDir } # --------------------------------------------------------------------------- # Get-AppList: Return the list of apps to be removed # --------------------------------------------------------------------------- function Get-AppList { begin { # Look for a config file. $configFile = "$PSScriptRoot\RemoveApps.xml" if (Test-Path -Path $configFile) { # Read the list Write-Verbose "Reading list of apps from $configFile" $list = Get-Content $configFile } else { # No list? Build one with all apps. Write-Verbose "Building list of provisioned apps" $list = @() if ($script:Offline) { Get-AppxProvisionedPackage -Path $script:OfflinePath | % { $list += $_.DisplayName } } else { Get-AppxProvisionedPackage -Online | % { $list += $_.DisplayName } } # Write the list to the log path $logDir = Get-LogDir $configFile = "$logDir\RemoveApps.xml" $list | Set-Content $configFile Write-Information "Wrote list of apps to $logDir\RemoveApps.xml, edit and place in the same folder as the script to use that list for future script executions" } Write-Information "Apps selected for removal: $list.Count" } process { $list } } # --------------------------------------------------------------------------- # Remove-App: Remove the specified app (online or offline) # --------------------------------------------------------------------------- function Remove-App { [CmdletBinding()] param ( [parameter(Mandatory=$true,ValueFromPipeline=$true)] [string] $appName ) begin { # Determine offline or online if ($script:Offline) { $script:Provisioned = Get-AppxProvisionedPackage -Path $script:OfflinePath } else { $script:Provisioned = Get-AppxProvisionedPackage -Online $script:AppxPackages = Get-AppxPackage } } process { $app = $_ # Remove the provisioned package Write-Information "Removing provisioned package $_" $current = $script:Provisioned | ? { $_.DisplayName -eq $app } if ($current) { if ($script:Offline) { $a = Remove-AppxProvisionedPackage -Path $script:OfflinePath -PackageName $current.PackageName } else { $a = Remove-AppxProvisionedPackage -Online -PackageName $current.PackageName } } else { Write-Warning "Unable to find provisioned package $_" } # If online, remove installed apps too if (-not $script:Offline) { Write-Information "Removing installed package $_" $current = $script:AppxPackages | ? {$_.Name -eq $app } if ($current) { $current | Remove-AppxPackage } else { Write-Warning "Unable to find installed app $_" } } } } # --------------------------------------------------------------------------- # Main logic # --------------------------------------------------------------------------- $logDir = Get-LogDir Start-Transcript "$logDir\RemoveApps.log" Get-AppList | Remove-App Stop-Transcript - - - Updated - - - It also requires a file with the apps listed you want removed , heres mine "RemoveApps.xml" Microsoft.BingWeather Microsoft.GetHelp Microsoft.Getstarted Microsoft.Messaging Microsoft.Microsoft3DViewer Microsoft.MicrosoftOfficeHub Microsoft.MixedReality.Portal Microsoft.Office.OneNote Microsoft.OneConnect Microsoft.People Microsoft.Print3D Microsoft.SkypeApp Microsoft.Wallet Microsoft.WindowsAlarms microsoft.windowscommunicationsapps Microsoft.WindowsFeedbackHub Microsoft.WindowsMaps Microsoft.Xbox.TCUI Microsoft.XboxApp Microsoft.XboxGameOverlay Microsoft.XboxGamingOverlay Microsoft.XboxIdentityProvider Microsoft.XboxSpeechToTextOverlay Microsoft.YourPhone Microsoft.ZuneMusic Microsoft.ZuneVideo Microsoft.WindowsCalculator Microsoft.MicrosoftSolitaireCollection Microsoft.Windows.Photos Microsoft.WindowsCamera 4
BOOT Posted January 10, 2020 Posted January 10, 2020 ...And it's scripts like that which cause so many problems with UWP Apps.
CamtheITman Posted March 20, 2021 Posted March 20, 2021 Hey fellow techies, been trying all day to get the windows ten pre installed apps offf our latops for all users that log onto the machine sadly to no avail. Ive tried the "Remove-AppxProvisionedPackage" command i powershell and still no luck, it removes it for the admin account but not any student accounts. the backstory is we have the government given laptops (during covid) and we've been asked to set a few of them up as isolation laptops. Now these are Dell Latitude 3160 laptops with 64gb of HD space so not enough room for the CC4 but we have attached it to the school domain and created specific isolation accounts. the rpoblems is these are vanilla windows 10 laptops meaning all the pre installed apps are still there and after running powershell scripts and experiment all day i have still not come to a solution where it removes these apps for users other than the admin on the machine. has anyone got any ideas on how to solve this?
bigstan48 Posted March 20, 2021 Posted March 20, 2021 I've recently been introduced to a powershell script called "decrapifier". Take a look and see if that will help you or someone else on the forum. https://win10.guru/windows-10-decrapifier/#:~:text=Windows%2010%20Decrapifier%20is%20a,tasks%2C%20and%20modifying%20privacy%20settings. 1
jmak Posted March 20, 2021 Posted March 20, 2021 I think you need to do it before installation of Windows. I always used to remove it from the WIM before deploying using MDT (same approach works with SCCM). I think a lot of people now and the commands to the task sequence during deployment - if you only have a few machines or if you're leaving them to run unattended that might work for you, but it speed down deployment too much for me. The other option is to use a customised start layout which hides the apps and then use app locker to prevent them running, but in that case they would all install with every new user - some people find that works fine, but in the machines I was running, the first login was too slow. Most of the options are described in this thread, but it's long and involved: https://www.edugeek.net/showthread.php?t=165029 1
jslate1980 Posted March 20, 2021 Posted March 20, 2021 You could use wim witch to edit the install.wim file to remove apps before install. https://msendpointmgr.com/2019/10/04/wim-witch-a-gui-driven-solution-for-image-customization/ 1
CamtheITman Posted March 25, 2021 Posted March 25, 2021 Thanks, we used decrapifier and it worked perfectly. we have now created an isolation image of winows 10 so we don't encounter that issue again.
kennysarmy Posted March 25, 2021 Posted March 25, 2021 This also might help https://msendpointmgr.com/2019/05/03/remove-built-in-apps-for-windows-10-version-1903/
KK20 Posted March 31, 2021 Posted March 31, 2021 (edited) be very careful removing lots of apps, I recommend you look at event viewer for a regular user. We had lots of problems with windows 10 onenote, calculator, "alarms and clock" for timers etc. We were quite careful what we removed too. Since 1909 we have left the apps alone and found no issues or side effects. We block apps via GPO applocker instead. Be aware that there is a bug in that once you start using applocker you cannot really stop using it. The registry keys remain so you need to clear those out if you want to stop using applocker completely. Edited March 31, 2021 by KK20
dmason2 Posted April 23, 2021 Posted April 23, 2021 Normally run these two powershell commands: Get-AppxPackage| Remove-AppxPackage Get-AppxProvisionedPackage-online | Remove-AppxProvisionedPackage -online
Zoom7000 Posted April 23, 2021 Posted April 23, 2021 I use Sophia Script. It has a nice GUI that allows you to apply several tweaks to Windows 10, alongside removing any Windows 10 apps, just by unchecking what you don't want.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now