Customise OS with PowerShell script to remove ALL Apps.

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #11

    Hi Superfly,

    Superfly said:
    It depends which set of packages you want to remove AppXProvisionedPackage is different to AppxPackage - so the commands will differ

    So if I understand correctly, using . . .
    Code:
    $Applist | Where-Object {$_.PackageName -NotLike "*MSPaint*" -and $_.PackageName -NotLike "*Photo*"} | ForEach-Object {Remove-AppxProvisionedPackage -Online -PackageName $_.PackageName }
    . . . ONLY prevents the apps from being installed for NEW users?

    So if I wanted to remove the Apps from My User account, would I use something like this . . .
    Code:
    Get-AppxPackage | Where-Object {$_.Name –NotLike "*MSPaint*"} | Where-Object {$_.Name –NotLike "*Photo*"} | Remove-AppxPackage

    I basically just want to DELETE them from both the Administrator account and the My User account.

    Thanks in advance.
      My Computer


  2. Posts : 3,453
       #12

    Paul Black said:
    Hi Superfly,




    So if I understand correctly, using . . .
    Code:
    $Applist | Where-Object {$_.PackageName -NotLike "*MSPaint*" -and $_.PackageName -NotLike "*Photo*"} | ForEach-Object {Remove-AppxProvisionedPackage -Online -PackageName $_.PackageName }
    . . . ONLY prevents the apps from being installed for NEW users?

    So if I wanted to remove the Apps from My User account, would I use something like this . . .
    Code:
    Get-AppxPackage | Where-Object {$_.Name –NotLike "*MSPaint*"} | Where-Object {$_.Name –NotLike "*Photo*"} | Remove-AppxPackage

    I basically just want to DELETE them from both the Administrator account and the My User account.

    Thanks in advance.
    Yep, that's the idea, however, the per user uninstall does not seem to work.

    According to the MS docs one must use the user's SID - so tried this:

    Code:
    $UserSID = (New-Object System.Security.Principal.NTAccount('Administrator')).Translate([System.Security.Principal.SecurityIdentifier]).value
    
    Get-AppxPackage -User $UserSID | Where-Object {$_.Name –NotLike "*MSPaint*"} | Remove-AppxPackage -User $UserSID
    Doesn't work


    then this...

    Code:
    $UserSID = (New-Object System.Security.Principal.NTAccount('Administrator')).Translate([System.Security.Principal.SecurityIdentifier]).value
    
    Get-AppxPackage -User $UserSID | Where-Object {$_.Name –NotLike "*MSPaint*"} | Remove-AppxPackage -AllUsers
    does seem to work but all users are affected.
      My Computer


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #13

    Hello Superfly,

    Superfly said:
    Code:
    $UserSID = (New-Object System.Security.Principal.NTAccount('Administrator')).Translate([System.Security.Principal.SecurityIdentifier]).value
    Get-AppxPackage -User $UserSID | Where-Object {$_.Name –NotLike "*MSPaint*"} | Remove-AppxPackage -AllUsers
    . . . does seem to work but all users are affected.
    It didn't work for me for some reason!

    I think I will leave this as I am going to setup a customised ISO anyway. I will therefore, either do this prior to creating the installation ISO, or during installation using Sysprep/Audit mode.

    Thanks for your time and input on this, it is appreciated.
      My Computer


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #14

    I wonder if someone can just see if my logic is correct here please.

    To make sure that everything [the Apps I DON'T want] are truly gone, will the below logic work?

    My understanding is that they need to be removed using the Get-AppxPackage AND using the Get-AppxProvisionedPackage.

    Here are a few examples of what I mean above.

    Using the Get-AppxPackage . . .
    Code:
    Get-AppxPackage -AllUsers *Microsoft.BingWeather* | Remove-AppxPackage -AllUsers
    Get-AppxPackage -AllUsers *Microsoft.MicrosoftStickyNotes* | Remove-AppxPackage -AllUsers
    Get-AppxPackage -AllUsers *Microsoft.Office.OneNote* | Remove-AppxPackage -AllUsers
    Using the Get-AppxProvisionedPackage . . .
    Code:
    Get-AppxProvisionedPackage -AllUsers *Microsoft.BingWeather* | Remove-AppxProvisionedPackage -AllUsers
    Get-AppxProvisionedPackage -AllUsers *Microsoft.MicrosoftStickyNotes* | Remove-AppxProvisionedPackage -AllUsers
    Get-AppxProvisionedPackage -AllUsers *Microsoft.Office.OneNote* | Remove-AppxProvisionedPackage -AllUsers
    Then to make sure that they are NOT re-installed when a new update/rollout is released, I can use . . .
    Code:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Office.OneNote_8wekyb3d8bbwe]

    Thanks in advance.
      My Computer


  5. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #15

    Has anybody had time to reflect on my above post?
      My Computer


  6. Posts : 1,218
    W10-Pro 22H2
       #16

    My (limited) understanding is that one has to use Remove-AppxPackage to uninstall packages first (which doesn't actually remove anything from the disk), and although the -allusers switch may find all installed packages, it only uninstalls for the current user, so one has to do it for (and when logged in as) each user in turn (that is my experience, may be changed now, may be wrong -see here for an admitedly old link). In addition, standard (non-admin) users are prevented from doing this, so one has to elevate their acct to admin first - issuing the commands from an admin-level Powershell window doesn't work either, as the target is then that admin user, and not the intended std user.

    Once that is out of the way, and all packages have been uninstalled, Remove-AppxProvisionedPackage prevents the package from being installed for new users, and magically (ie silently behind the scenes) removes the packages from the relevant folders - see here for some rather unhelpful MS info. The folders are 'Program Files\Windows Apps' (very well hidden, needs Wiztree or Treesize (in admin mode) to see, and 'Windows\systemapps' (used to be 'infusedapps' - or perhaps this is now empty because I removed them all?).

    But I don't think your wildcard option will work - the Remove-AppxProvisionedPackage command requires the 'packagename' (not the 'name', or the 'packagefullname’ - how helpful!), and the examples I have seen (and copied to use) have had to resort to a different way to extract it without knowing the full monte:
    Code:
    "Get-appxprovisionedpackage –online | where-object {$_.packagename –like '*Microsoft.BingWeather*'} | remove-appxprovisionedpackage –online"
    Note the use of the -online switch to ensure the command works on the current installation.

    There is a full (and very long) list of commands here, but I prefer to remove all but a few, using something like this:
    Code:
    Get-AppxProvisionedPackage -Online | where {$_.DisplayName -notlike "*store*" -and $_.DisplayName -notlike "*calc*"} | Remove-AppxProvisionedPackage -Online
    In fact I remove the lot! Nothing of any size has re-appeared in the last year. hth, Martin
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #17

    Thanks for the detailed reply mngerhold, it is appreciated.

    When I first looked into this there were conflicting methods/opinions of what should be used, hence my confusion and leading to this thread!

    I checked out the two links that you kindly provided and they do seem to relay what is the generally accepted method to achieve this.

    With this in mind, I think that the below should work for the instances required [please let me know what you think!] . . .
    Code:
    $AppName = @(
    “*BingWeather*”
    “*GetHelp*”
    “*Getstarted*”
    “*Messaging*”
    “*Microsoft3DViewer*”
    “*MicrosoftOfficeHub*”
    “*MicrosoftSolitaireCollection*”
    “*MicrosoftStickyNotes*”
    “*MixedReality*”
    “*Office*”
    "*Paint*"
    “*OneConnect*”
    “*People*”
    “*Print3D*”
    “*ScreenSketch*”
    “*SkypeApp*”
    “*StorePurchaseApp*”
    “*Wallet*”
    “*Windows*”
    “*WindowsAlarms*”
    “*WindowsCalculator*”
    “*WindowsCamera*”
    “*WindowsCommunicationsApps*”
    “*WindowsFeedbackHub*”
    “*WindowsMaps*”
    “*WindowsSoundRecorder*”
    “*Xbox*”
    “*XboxApp*”
    “*XboxGameOverlay*”
    “*XboxGamingOverlay*”
    “*XboxIdentityProvider*”
    “*XboxSpeechToTextOverlay*”
    “*YourPhone*”
    “*ZuneMusic*”
    “*ZuneVideo*”
    )
    
    ForEach($App in $AppName){Get-AppxPackage -Name $App | Remove-AppxPackage -ErrorAction SilentlyContinue
    }
    Code:
    $AppName = @(
    “*BingWeather*”
    “*GetHelp*”
    “*Getstarted*”
    “*Messaging*”
    “*Microsoft3DViewer*”
    “*MicrosoftOfficeHub*”
    “*MicrosoftSolitaireCollection*”
    “*MicrosoftStickyNotes*”
    “*MixedReality*”
    “*Office*”
    “*OneConnect*”
    "*Paint*"
    “*People*”
    “*Print3D*”
    “*ScreenSketch*”
    “*SkypeApp*”
    “*StorePurchaseApp*”
    “*Wallet*”
    “*Windows*”
    “*WindowsAlarms*”
    “*WindowsCalculator*”
    “*WindowsCamera*”
    “*WindowsCommunicationsApps*”
    “*WindowsFeedbackHub*”
    “*WindowsMaps*”
    “*WindowsSoundRecorder*”
    “*Xbox*”
    “*XboxApp*”
    “*XboxGameOverlay*”
    “*XboxGamingOverlay*”
    “*XboxIdentityProvider*”
    “*XboxSpeechToTextOverlay*”
    “*YourPhone*”
    “*ZuneMusic*”
    “*ZuneVideo*”
    )
    
    ForEach($App in $AppName){Get-AppxProvisionedPackage -Online | Where {$_.PackageName -Like $App} | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
    }
    Code:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetHelp_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Getstarted_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Messaging_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MixedReality.Portal_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MSPaint_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Office.OneNote_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.OneConnect_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.People_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Print3D_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ScreenSketch_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.SkypeApp_kzf8qxf38zg5c]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.StorePurchaseApp_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Wallet_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Windows.Photos_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsAlarms_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsCalculator_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsCamera_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\microsoft.WindowsCommunicationsApps_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsMaps_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Xbox.TCUI_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxApp_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGameOverlay_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGamingOverlay_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxIdentityProvider_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.YourPhone_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneMusic_8wekyb3d8bbwe]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneVideo_8wekyb3d8bbwe]
    Thanks in advance.
    Last edited by Paul Black; 11 Feb 2020 at 19:04.
      My Computer


  8. Posts : 1,218
    W10-Pro 22H2
       #18

    Looks generally Ok (I am not familiar with all the possible switches). I know nothing about the reg 'deprovisioned' entries. Let us know how you get on!
      My Computer


  9. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #19

    Hello mngerhold,

    mngerhold said:
    Looks generally Ok (I am not familiar with all the possible switches). I know nothing about the reg 'deprovisioned' entries. Let us know how you get on!
    I did some more reading on Apps etc, and it seemed the more I read the more confused I got!
    Everybody seems to have their own idea about how this should be done!

    Anyway, I ran the above test code in different sequences and with different users [Built-In Administrator and my Local Administrator] and eventually came up with a method of how it does actually work. I had taken an image prior to running the scripts so I could re-image to test the next set of sequences [it takes less than 5 minutes to re-image].

    Here is the code that I am actually going to use after a clean install at some point in the future, although I have run this code already and the OS is stable.

    One point though, running the Remove-AppxPackage and the Remove-AppxProvisionedPackage, it appears that there is no need to run the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned] script as the Deprovisioned folder gets created after running the Remove-AppxProvisionedPackage. I have included notes at the top of the code . . .

    Code:
    # Remove-AppxPackage.
    # 
    # This can be run either OFFLINE or ONLINE.
    # 
    # Remove-AppxPackage removes App Packages [.Appx] from the CURRENT user ONLY.
    
    # Set-ExecutionPolicy Unrestricted
    
    $AppName = @(
    “*3DBuilder*”
    “*Advertising.Xaml*”
    “*AppConnector*”
    “*BingFinance*”
    “*BingNews*”
    “*BingSports*”
    “*BingWeather*”
    “*BioEnrollment*”
    “*CommsPhone*”
    “*GetHelp*”
    “*GetStarted*”
    “*Holo*”
    “*Messaging*”
    “*Microsoft3DViewer*”
    “*MicrosoftEdge*”
    “*MixedReality*”
    “*MSPaint*”
    “*Office.OneNote*”
    “*Office.Sway*”
    “*Office*”
    “*OfficeHub*”
    “*OneConnect*”
    “*OneNote*”
    “*Paint*”
    “*People*”
    “*Photos*”
    “*Print3D*”
    “*ScreenSketch*”
    “*SkypeApp*”
    “*SolitaireCollection*”
    “*StickyNotes*”
    “*StorePurchaseApp*”
    “*Wallet*”
    “*Windows.CBSPreview*”
    “*Windows.CloudExperienceHost*”
    “*Windows.ContactSupport *”
    “*Windows.ContentDeliveryManager*”
    “*Windows.HolographicFirstRun*”
    “*Windows.ParentalControls*”
    “*Windows.Photos*”
    “*Windows.ShellExperienceHost*”
    “*WindowsAlarms*”
    “*WindowsCalculator*”
    “*WindowsCamera*”
    “*WindowsCommunicationsApps*”
    “*WindowsFeedback*”
    “*WindowsFeedbackHub*”
    “*WindowsMaps*”
    “*WindowsPhone*”
    “*WindowsSoundRecorder*”
    “*Xbox.TCUI*”
    “*XboxApp*”
    “*XboxGameCallableUI*”
    “*XboxGameOverlay*”
    “*XboxGamingOverlay*”
    “*XboxIdentityProvider*”
    “*XboxSpeechToTextOverlay*”
    “*YourPhone*”
    “*ZuneMusic*”
    “*ZuneVideo*”
    )
    
    ForEach($App in $AppName){
    Get-AppxPackage -Name $App | Remove-AppxPackage -ErrorAction SilentlyContinue
    }
    
    # Uninstall OneDrive
    taskkill /f /im OneDrive.exe
    C:\Windows\SysWOW64\OneDriveSetup.exe /Uninstall
    
    Pause
    
    # EOF
    Code:
    # Remove-AppxProvisionedPackage.
    # 
    # This needs to be run using the Built-In Administrator.
    # This needs to be run ONLINE.
    # 
    # When the AppxProvisionedPackage gets removed, a Registry Key gets created that tells 
    # Windows NOT to reinstall or update that App the next time there is a Windows Update/ 
    # Rollout. These Registry Keys are stored in a newly created Deprovisioned folder here: 
    # HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\
    # Running this as the Built-In Administrator also creates the Deprovisioned folder for
    # the other User accounts.
    # 
    # If you run this OFFLINE, then the Deprovisioned folder does NOT get created, and  
    # therefore the Registry Keys do NOT get created. This means that the next Windows is 
    # updated, it will re-install ALL the Apps.
    # 
    # This also prevents Win 10 Apps installing for NEW Users.
    
    # Set-ExecutionPolicy Unrestricted
    
    $AppName = @(
    “*3DBuilder*”
    “*Advertising.Xaml*”
    “*AppConnector*”
    “*BingFinance*”
    “*BingNews*”
    “*BingSports*”
    “*BingWeather*”
    “*BioEnrollment*”
    “*CommsPhone*”
    “*GetHelp*”
    “*GetStarted*”
    “*Holo*”
    “*Messaging*”
    “*Microsoft3DViewer*”
    “*MicrosoftEdge*”
    “*MixedReality*”
    “*MSPaint*”
    “*Office.OneNote*”
    “*Office.Sway*”
    “*Office*”
    “*OfficeHub*”
    “*OneConnect*”
    “*OneNote*”
    “*Paint*”
    “*People*”
    “*Photos*”
    “*Print3D*”
    “*ScreenSketch*”
    “*SkypeApp*”
    “*SolitaireCollection*”
    “*StickyNotes*”
    “*StorePurchaseApp*”
    “*Wallet*”
    “*Windows.CBSPreview*”
    “*Windows.CloudExperienceHost*”
    “*Windows.ContactSupport *”
    “*Windows.ContentDeliveryManager*”
    “*Windows.HolographicFirstRun*”
    “*Windows.ParentalControls*”
    “*Windows.Photos*”
    “*Windows.ShellExperienceHost*”
    “*WindowsAlarms*”
    “*WindowsCalculator*”
    “*WindowsCamera*”
    “*WindowsCommunicationsApps*”
    “*WindowsFeedback*”
    “*WindowsFeedbackHub*”
    “*WindowsMaps*”
    “*WindowsPhone*”
    “*WindowsSoundRecorder*”
    “*Xbox.TCUI*”
    “*XboxApp*”
    “*XboxGameCallableUI*”
    “*XboxGameOverlay*”
    “*XboxGamingOverlay*”
    “*XboxIdentityProvider*”
    “*XboxSpeechToTextOverlay*”
    “*YourPhone*”
    “*ZuneMusic*”
    “*ZuneVideo*”
    )
    
    ForEach($App in $AppName){
    Get-AppxProvisionedPackage -Online | Where {$_.PackageName -Like $App} | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
    }
    
    Pause
    
    # EOF
    If you or anyone else can see anything wrong with my code, or can elaborate on why the Deprovisioned .reg script is not needed, then please let me know.

    Thanks in advance.
    Last edited by Paul Black; 11 Feb 2020 at 20:26.
      My Computer


  10. Posts : 1,218
    W10-Pro 22H2
       #20

    I have taken the liberty of extracting your code. Well done for all the effort - new apps will certaianly appear, so the code will inevitably need to be updated. Extra points for a sorted list!

    I don't understand about the deprovisioned reg keys - this link from MS says a lot about it but leaves me even more in the dark! I seem to have a full (?) list of reg keys, and I didn't create them.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:13.
Find Us




Windows 10 Forums