Using PowerShell cmdlets (command dism works fine, too) is exactly the right way for deployments. The Component Store tracks all files, directories, tasks, registry settings, etc. which make up a component package, hence why you run that command after you do offline removals. And a "manual method" would be abysmal. Unless you're lit up on amphetamines, tracking down every hard link from a component package would be an absurd waste of time. Use Dependency Walker sometime and just watch, in real time, what is actually installed. But to each his own.
Yeah, I thought that these packages were more or less independent, but after checking out CBSEnum more I realized how inter-connected all those AppX's are! Press "Decouple" and it will show you countless connections to other packages. What about the App Repository? That is how I get rid pretty much everything "bloaty" . You need to open the SQL file (tricky!) and find package names and set them to IsInbox=0. Some are set to 0 by default and they are the ones you can "remove" with PowerShell, but it is not complete removal - its just uninstallation / de-activation. Still, once those packages are de-activated, they are not used by anything.
I'm curious why you leave integrate .NET Framework as a last step for. I've always done it first to integrate as it listed first.
I be interested in removing all Holo packages as well. As I don't have much knowledge commands scripts.
Please do specify the Windows 10 Build you are using, is it RS2 or RS3 IP coz for RS3 IP, some packages are merged in other package and the present the ToolKit can't remove them and we need to use the manual method to remove it. Code: ------------------------------------------------------------------------------- Removing Windows Defender Client Package... ------------------------------------------------------------------------------- Deployment Image Servicing and Management tool Version: 10.0.15063.0 Image Version: 10.0.16184.1001 Processing 1 of 1 - Removing package Windows-Defender-Client-Package~31bf3856ad364e35~x86~~10.0.16184.1001 [==========================100.0%==========================] The operation completed successfully. ------------------------------------------------------------------------------- Removing Windows Defender Advanced Threat Protection Package... ------------------------------------------------------------------------------- Deployment Image Servicing and Management tool Version: 10.0.15063.0 Image Version: 10.0.16184.1001 Processing 1 of 1 - Removing package Microsoft-Windows-SenseClient-Package~31bf3856ad364e35~x86~~10.0.16184.1001 [==========================100.0%==========================] The operation completed successfully. ------------------------------------------------------------------------------- Removing Windows Shield Provider Core Package... ------------------------------------------------------------------------------- Deployment Image Servicing and Management tool Version: 10.0.15063.0 Image Version: 10.0.16184.1001 Processing 1 of 1 - Removing package Windows-Shield-Provider-Core-Package~31bf3856ad364e35~x86~~10.0.16184.1001 [==========================100.0%==========================] The operation completed successfully. ------------------------------------------------------------------------------- Removing Windows Defender Application Guard Inbox Package... ------------------------------------------------------------------------------- The Windows Package Doesn't Exist... ------------------------------------------------------------------------------- Removing Windows Defender App Package... ------------------------------------------------------------------------------- MSMG ToolKit - Windows Deployment Image Customization Tool Version: 7.1 Image Version: 10.0.16184.1001 Taking Ownership and Removing Package files... Mounting Image Registry... Taking Ownership and Removing Package Registry Entries... Un-Mounting Image Registry... Operation Completed Successfully... ------------------------------------------------------------------------------- Removing Windows Defender Group Policy Package... ------------------------------------------------------------------------------- Deployment Image Servicing and Management tool Version: 10.0.15063.0 Image Version: 10.0.16184.1001 Processing 1 of 1 - Removing package Windows-Defender-Group-Policy-Package~31bf3856ad364e35~x86~~10.0.16184.1001 [==========================100.0%==========================] The operation completed successfully. ------------------------------------------------------------------------------- ####Finished Removing Windows Components####################################### ------------------------------------------------------------------------------- =============================================================================== Press any key to continue . . .
Because you can not clean up your mounted install.wim if you integrate it first. This is especially important when installing cumulative updates, but I always run this Code: DISM /Image:H:\Portable_Files\3-Toolkits\ToolKit-v7.1\Mount\Install\ /Cleanup-Image /ScanHealth DISM /Image:H:\Portable_Files\3-Toolkits\ToolKit-v7.1\Mount\Install\ /Cleanup-Image /StartComponentCleanup /ResetBase pause exit after I do everything I want to do to the mounted image. Then I integrate .Net Framework, save, and unmount.
I know but my question is if I need to run those 2 PowerShell commands that I mentioned after removing Windows Defender and if so, when (before applying the image, for example)? And how can I remove these apps? Microsoft.StorePurchaseApp Microsoft.DesktopAppInstaller Microsoft.XboxGameOverlay Microsoft.XboxIdentityProvider Microsoft.XboxSpeechToTextOverlay I guess that by removing the Xbox app I removed the last 3 apps so how can I remove the first two?
Thanks. Well looks like I have to modifier my original iso again. I'll save your command as a script.
I don't know whether the PowerShell Cmdlets uses the DISM API method or it uses the DISM command line to remove the package but as far I have tried the normal DISM command line method is not the right choice to remove a package from an offline image as it leaves behind a lot of junk files and also either it removes too much files or too less which can break the OS functionality in some circumstances. Try out yourself removing any component like Defender in the present RS2 build and also apply the DISM /Cleanup-image command too and see if it has removed the Junk files from the image or not. And also in order to remove some packages like The Defender App (Microsoft.Windows.SecHealthUI), The Parental Controls you have to use the Manual method and the DISM method will not come to any help. The DISM method is the right method for Integrating the stuff but its not the same for Removing it. In manual method you can know where and what files/folders it gets installed and also you can know which app/component depends which files and there by you can retain the dependency files to fix functionality or to separate a component.
Coz you can't remove the Hyper-V for Windows 10 64-bit when .NET Framework is integrated and also you can't perform the Image Cleanup too, that's why I do add it at the last.
Sorry, but what's the order? First, I remove Windows Defender, then I run those 2 Powershell commands, after that I apply the image and finally I create the ISO? What's the manual method? The normal way within this tool? How can I remove the Defender App and the Parental Controls? EDIT: How can I remove those apps I mentioned earlier?
1) Before applying the changes to the image. 2) I have merged the Xbox and Store apps removal and choosing it will remove all the specified the apps. If you want to remove them manually then use the below command Code: dism /Image:mount\install /Remove-ProvisionedAppxPackage /PackageName:Microsoft.StorePurchaseApp_1.0.454.0_neutral_~_8wekyb3d8bbwe dism /Image:mount\install /Remove-ProvisionedAppxPackage /PackageName:Microsoft.DesktopAppInstaller_1.1.25002.0_neutral_~_8wekyb3d8bbwe
Ok, thanks! So, I have to remove Windows Defender first, then run those commands and after that apply the image (or before applying it I must run those commands in order to remove those apps, I think), right? And what about the Defender App and the Parental Controls you mentioned? Should I remove them if I want to remove Windows Defender? Is the latter related to Windows Defender? Why don't you make an option which removes those apps I mentioned and the Xbox app without messing up the Store app? It would save a lot of time...
Thanks. I'll change my instruction list so that .NET Framework is to be done last. Also I never remove Hyper-V.
The Toolkit uses both the DISM Method and also the Manual one to remove some components like Defender and you can use the ToolKit to remove the Defender and then run those commands you specified and apply the changes and rebuild the image and create the image or copy it to USB and deploy the OS. In RS2 the Parental Controls package has been merged into some other package and the Toolkit can't remove them at present. I'm working out the manual method to remove it and it will be available in future version.
Have you seen this post? Look behind the spoilers for his custom lists ... and read carefully about the wet dream ... You have probably found the section inside Toolkit.cmd that explains how to do this ...? If not, open Toolkit-vX.X.cmd (iuse Notepad++ to see line numbers) and search for 'Using Package List' in Toolkit v7.1 it's at line 22177 I started down this path and decided that it's madness! One method is to search in Toolkit-vX.X.cmd for '-Package' and, at the very least, you'll begin to appreciate all the effort MSMG makes to write this software. For example: Choosing to remove 'Microsoft Xbox & Gaming' in MSMG Toolkit removes nine items that you would have to list individually in your custom package list.