Solved A Powershell dummy needs a Powershell expert


glasskuter

aka Mama Glass
Guru
VIP
Local time
6:46 AM
Posts
12,316
Location
The Lone Star State of Texas
OS
Windows 11 Pro 25H2 26200.9457
I am pretty much illiterate in powershell so I need some help.

1. Treesize shows 5 Dell apps using about 2 gb of disk space in folder C:\Windows|Program Files\Windows Apps. (see screenshot attached) These are all apps I uninstalled using Revo when I got this computer.

2. When I run Get-AppxPackage | Select Name, PackageFullName I do not see these apps installed for my user in the list. However, when I run Get-AppxPackage –AllUsers | Select Name, PackageFullName I do see these apps in the list for allusers.

3. In PS as admin, Using both package name and wildcards( *.*) I have attempted to remove these packages for all users.
Using PowerDirectorforDell as an example I enter either of the following:

PS C:\WINDOWS\system32> Get-AppxPackage -AllUsers *PowerDirector* | Remove-AppxPackage
PS C:\WINDOWS\system32> Get-AppxPackage -AllUsers DB6EA5DB.PowerDirectorforDell | Remove-AppxPackage


Each time it accepts either of those commands with no errors, but I followup with another Get-AppxPackage –AllUsers | Select Name, PackageFullName and the apps are still there. (Yes, I've restarted)

How do I get rid of these suckers?? What am I doing wrong? Is this something to do with permissions, maybe? Why does it accept the commands but not remove them? I want my 2 gb of storage back on principal more than anything else.

ARRRGGHHH!!!!! I hate powershell.


 

Attachments

  • Treesize1.jpg
    Treesize1.jpg
    354.6 KB · Views: 4

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9457i9-10900 10 core 20 threads32 gbnone-Intel UHD Graphics 630
    OS
    Windows 11 Pro 25H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • At a glance

    Windows 11 Pro 24H2 26200.9457AMD Ryzen 7 6800U32 gbintegrated
    Operating System
    Windows 11 Pro 24H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
  • System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.9457
2. If you specify User Name, then cmdlet returns packages ONLY installed for that user.

3. Have you checked you have file/folder permissions on Windows Apps subfolder?
 

My Computers My Computers

  • At a glance

    Windows 11AMD Ryzen 5 560016 GBSapphire Radeon RX 6500XT (8 GB version)
    OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 5600
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB
    Graphics Card(s)
    Sapphire Radeon RX 6500XT (8 GB version)
    Monitor(s) Displays
    BenQ Mobuiz EX2710Q QHD, Iiyama ProLite X23377HDS
    Hard Drives
    MSI Spatium M461 4TB
  • At a glance

    Windows 11Intel Celeron N4020
    Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Acer A114
    CPU
    Intel Celeron N4020
It might be worthwhile running those commands with a Process Monitor trace and then filtering the saved trace to the corresponding directories. It could possibly be "silently" failing.
 

My Computer My Computer

At a glance

Windows 11, Windows 10, Linux Fedora Cinnamon
OS
Windows 11, Windows 10, Linux Fedora Cinnamon
Enable the built-in Admin account, log in and remove them using Powershell?

Disable it again after of course

Are these apps not in the Start menu? Again, try it from the Admin account
 

My Computer My Computer

At a glance

Windows 11 Pro 25H2 (RP channel)AMD Ryzen 7 9800X3D 8-core64GB Corsair Titanium 6000/CL30MSI Suprim 5080 SOC
OS
Windows 11 Pro 25H2 (RP channel)
Computer type
PC/Desktop
Manufacturer/Model
MSI
CPU
AMD Ryzen 7 9800X3D 8-core
Motherboard
MEG X870E Godlike
Memory
64GB Corsair Titanium 6000/CL30
Graphics Card(s)
MSI Suprim 5080 SOC
Sound Card
Soundblaster AE-9
Monitor(s) Displays
ASUS TUF Gaming VG289Q
Screen Resolution
3840x2160
Hard Drives
Samsung 9100 Pro 4TB (gen 5 x4, system drive/games)
Samsung 990 Pro 2TB
Samsung 980 Pro 2TB
Samsung 870 Evo 4TB
Samsung 870 Evo 2TB
Samsung T9 4TB
PSU
Seasonic PX-2200
Case
Bequiet! Dark Base Pro 901
Cooling
Noctua NH-D15S Chromax black
Keyboard
Logitech G915 X (wired)
Mouse
Logitech G903 with PowerPlay charger
Internet Speed
900Mb/sec
Browser
Microsoft Edge
Antivirus
Windows Defender
Have you checked you have file/folder permissions on Windows Apps subfolder?
Yes, that's why I mentioned permissions above. The sub folder is owned by trusted installer. I hesitate to take control of the entire folder and there is no option to change ownership of individual packages. Jacking with trusted installer can get one in a such a mess. I was hoping there would be a way to use powershell to deal with these 5 app packages. Does anyone know if there will be no repurcussions by changing ownership of the folder long enough to see if I can remove the packages, and then changing ownership of folder back to trusted installer.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9457i9-10900 10 core 20 threads32 gbnone-Intel UHD Graphics 630
    OS
    Windows 11 Pro 25H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • At a glance

    Windows 11 Pro 24H2 26200.9457AMD Ryzen 7 6800U32 gbintegrated
    Operating System
    Windows 11 Pro 24H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
  • System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.9457
Appx packages are installed on a system level, but are individually registered for each user profile. So if you remove them for yourself, it only deletes your AppDataLocal files and settings. This allows other users, and future users to continue using the app for themselves.

The app isn't removed until it's unregistered for all user accounts.

Code:
PS C:\Windows\system32> Get-AppxPackage *Notepad* -AllUsers | Remove-AppPackage -AllUsers
PS C:\Windows\system32> Get-AppxPackage *Notepad* -AllUsers

PS C:\Windows\system32> dir "C:\Program Files\WindowsApps\Microsoft.WindowsNotepad_11.2112.32.0_x64__8wekyb3d8bbwe"
dir : Cannot find path 'C:\Program Files\WindowsApps\Microsoft.WindowsNotepad_11.2112.32.0_x64__8wekyb3d8bbwe' because it does not exist.

Get-AppxPackage -AllUsers DB6EA5DB.PowerDirectorforDell | Remove-AppxPackage -AllUsers
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Maybe WingetUI might be of help?

1691343920708.png
 

My Computers My Computers

  • At a glance

    Win 11 ProAMD Ryzen™ 7 7730U24GB Dual-Channel DDR4 @ 1596MHz (22-22-22-52)512MB ATI AMD Radeon Graphics (ASUStek Comput...
    OS
    Win 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook
    CPU
    AMD Ryzen™ 7 7730U
    Motherboard
    M1605YA
    Memory
    24GB Dual-Channel DDR4 @ 1596MHz (22-22-22-52)
    Graphics Card(s)
    512MB ATI AMD Radeon Graphics (ASUStek Computer Inc)
    Monitor(s) Displays
    Generic PnP Monitor (1920x1200@60Hz) - P1 PLUS (1920x1080@59Hz)
    Screen Resolution
    1920 X 1200
    Hard Drives
    953GB Western Digital WD
    PSU
    45 Watts
    Mouse
    Lenovo Bluetooth.
    Internet Speed
    500 Mbps
    Browser
    Edge
    Antivirus
    Defender
  • At a glance

    Windows 11AMD Ryzen 7 5800H / 3.2 GHz32 GB DDR4 SDRAM 3200 MHzNVIDIA GeForce RTX 3060 6 GB GDDR6 SDRAM
    Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ACER NITRO
    CPU
    AMD Ryzen 7 5800H / 3.2 GHz
    Motherboard
    CZ Scala_CAS (FP6)
    Memory
    32 GB DDR4 SDRAM 3200 MHz
    Graphics card(s)
    NVIDIA GeForce RTX 3060 6 GB GDDR6 SDRAM
    Sound Card
    Realtek Audio. NVIDIA High Definition Audio
    Monitor(s) Displays
    15.6" LED backlight 1920 x 1080 (Full HD) 144 Hz
    Screen Resolution
    1920 x 1080 (Full HD)
    Hard Drives
    Samsung 970 Evo Plus 2TB NVMe M.2
    PSU
    180 Watt, 19.5 V
    Mouse
    Lenovo Bluetooth
    Internet Speed
    500 Mbps
    Browser
    Edge
    Antivirus
    Defender
The app isn't removed until it's unregistered for all user accounts.
Yes, I know. I entered that exact command (Post #1 step 3) The command did not error, showed it completed, but package still not removed. Enabled hidden administrator account. Those 5 apps were in all app list. I uninstalled them from that account and then tried to remove the app packages using PS from administrator. Same exact thing. Tried @Fabler2 suggestion. Winget list command does not show those 5 apps installed so can't do anything using Winget.

It just pi$$es me off that I can't get rid of an app package for a manufacturer app. I ain't liking it but guess I have to live with it. Things like this irk me to no end.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9457i9-10900 10 core 20 threads32 gbnone-Intel UHD Graphics 630
    OS
    Windows 11 Pro 25H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • At a glance

    Windows 11 Pro 24H2 26200.9457AMD Ryzen 7 6800U32 gbintegrated
    Operating System
    Windows 11 Pro 24H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
  • System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.9457
Are they protected with the NonRemovable flag?
Get-AppxPackage *Dell* | select Name,NonRemovable
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9457i9-10900 10 core 20 threads32 gbnone-Intel UHD Graphics 630
    OS
    Windows 11 Pro 25H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • At a glance

    Windows 11 Pro 24H2 26200.9457AMD Ryzen 7 6800U32 gbintegrated
    Operating System
    Windows 11 Pro 24H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
  • System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.9457
Not sure if this might help or is even possible but have you checked the GPE, I assume it is the Windows Pro as listed in your profile, to see if Dell has changed or added a policy to protect thier software from removal?
 

My Computer My Computer

At a glance

Windows 11 Pro 22H2, build: 22621.521Intel i7-12700K 3.6GHz Base (5.0GHz Turbo)64GB DDR 3600MhzAsus Tuff RTX 3080 10GB OC
OS
Windows 11 Pro 22H2, build: 22621.521
Computer type
PC/Desktop
Manufacturer/Model
Scan 3XS Custom 1700
CPU
Intel i7-12700K 3.6GHz Base (5.0GHz Turbo)
Motherboard
Asus ProArt Creator B660 D4
Memory
64GB DDR 3600Mhz
Graphics Card(s)
Asus Tuff RTX 3080 10GB OC
Sound Card
Onboard Realtek
Monitor(s) Displays
Gigabyte G32QC 32inch 16:9 curved @2560 x 1440p 165Hz Freesync Premium Pro/ Dell SE2422H 24inch 16:9 1920 x 1080p 75Hz Freesync
Screen Resolution
2560 x 1440p & 1920 x 1080p
Hard Drives
WD SN570 1TB NVME (Boot), Samsung 870QVO 1TB (SSD), SanDisk 3D Ultra 500Gb (SSD) x2, Seagate 3Tb Expansion Desk (Ext HDD), 2x Toshiba 1Tb P300 (Ext HDD)
PSU
Corsair RM1000X Modular
Case
Corsair 4000D Airflow Desktop
Cooling
Corsair Hydro H150i RGB Pro XT 360mm Liquid Cooler, 3 x 120mm fans, 1x Exhaust
Keyboard
Microsoft Ergonomic
Mouse
Logitech G402
Internet Speed
800Mbs
Browser
Edge Chromium
Antivirus
Defender, Malwarebytes
I think, from what you've written, that you are using
Uninstall Apps - ElevenForumTutorials
and I wondered if asking in the tutorial thread might be useful.

[That comment about the Built-in Admin won't help you. It is no more powerful than any Admin account you have created yourself.]


Best of luck,
Denis
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.9168
To anyone interested, I found my answer why I couldn't delete these packages. It seems this is folder specific. When you check permissions for the WindowsApps folder, you get an error message "access point corrupted", even when there's actually not an issue with the folder but still throws out an error message anyway. This was all after I had come up clean with SFC and used DISM.
This is a really informative article you might want to keep handy if you ever have to deal with trusted installer permissions.
I jumped through hoops but was able to get permission away from trusted installer, delete the apps in PS, and then assign trusted installer ownership again. We'll see if I end up having any repurcussions from it when using any of my other store apps. I always have a backup if anything squirrelly happens.
Thanks for your suggestions.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 26200.9457i9-10900 10 core 20 threads32 gbnone-Intel UHD Graphics 630
    OS
    Windows 11 Pro 25H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • At a glance

    Windows 11 Pro 24H2 26200.9457AMD Ryzen 7 6800U32 gbintegrated
    Operating System
    Windows 11 Pro 24H2 26200.9457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
  • System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.9457
Back
Top Bottom