New
#1
Customise OS with PowerShell script to remove ALL Apps.
I have been playing around with customising an Win 10 Pro ISO for installation. I basically want to get rid of pretty much ALL the Apps besides about three.
For customisation, I have tried out WinReducer, MSMG, and WinToolkit, all of which allowed various levels of customisation with respect to what is included in their software. Removing Components, Features, Appearance, Unattend etc, is pretty much OK in all of them!
After installing each of the above, I tried out the Windows10Debloater.ps1, Classic Shell, O&O ShutUp10, and Ultimate Windows Tweaker, again, all with varying results, although a combination of these does seem to give me the required results, well almost!
Anyway, back to my question.
Using the customisation software, there were problems with the installed system with regards to things not working correctly. Obviously this would be a nightmare to try and resolve them, so I thought that maybe I could install and untouched ISO and then DELETE the Apps using a PowerShell script [and then customise for security etc].
To do this by individual Apps I came up with this . . .
Code:$Applist = Get-AppXProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*CloudExperienceHost*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*3D*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*AdvertisingXaml*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Alarms*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*AppConnector*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*AppInstaller*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*BingWeather*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Calculator*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Camera*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*ContentDeliveryManager*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Cortana*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*DesktopAppInstaller*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Edge*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Feedback*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*GetHelp*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Getstarted*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Holographic*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*InputApp*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Maps*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Messaging*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*MixedReality*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*MSPaint*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*NarratorQuickStart*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*OfficeHub*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*OfficeOneNote*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*OneConnect*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*ParentalControls*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*People*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Phone*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Photo*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*ScreenSketch*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*SkypeApp*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*SolitaireCollection*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*SoundRecorder*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*StickyNotes*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Store*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Sway*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Wallet*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*WindowsCommunicationsApps*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Xbox*"} | Remove-AppxProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -Like "*Zune*"} | Remove-AppxProvisionedPackage -Online
I thought I would write a script that does them ALL at once and just leaves the ones I want. Therefore I came up with this . . .
Code:$Applist = Get-AppXProvisionedPackage -Online $Applist | Where-Object {$_.PackageName -NotLike "*Alarms*"} | Where-Object {$_.PackageName -NotLike "*MSPaint*"} | Where-Object {$_.PackageName -NotLike "*Photo*"} | Remove-AppxProvisionedPackage -Online
I should mention that I ran . . .
. . . initially to give me full access rights.Code:Set-ExecutionPolicy Unrestricted
The script runs but doesn't seem to do anything because when I click the Apps they still open. I did restart after the script had completed.
Has anyone got any ideas please?
Thanks in advance.