Microsoft's Windows 11 operating system includes dozens of default applications that are available by default right after installation on first run. Some of these applications provide core functionality, like photo viewing, media playing or plain text editing. Others have a narrow focus that is of use to a small subset of Windows users only.
Many of the preinstalled apps can be removed from the Windows machine, either through Settings > Apps, PowerShell commands, or by using a program like winget, the Windows Packet Manager. The apps occupy disk space and some administrators may want to remove them to free up space on a drive
When it comes to determining the actual size these apps occupy, administrators will run into roadblocks. The Settings > Apps listing is useless for this, as many of the default Windows apps are listed with a few Kilobytes of size only.
The storage readings are not correct. The reason for the low number that is reported for preinstalled Windows apps is that these applications may be installed into multiple folders. Microsoft's Settings application returns the size of one of the folders as it ignores any other folder that stores application files.
The same is true when you run regular PowerShell commands to return application listings.
Michael Niehaus analyzed the behavior on Windows 11. He published his findings in a blog post on his website and created a PowerShell script that returns the full size of default applications on Windows systems.
The PowerShell script is available as a download. Just download the zip archive to the local system and extract it to get started.
Use the Start Menu to launch an elevated PowerShell prompt, navigate to the folder the script is stored in, and run .\Get-AppSizes.ps1 -online | Out-GridView to get the output.
Note that you need to allow the execution of third-party scripts and select "run once" when prompted to run it. Cautious users may look at the code before they run the script to make sure it is safe to run.
Get-AppxProvisionedPackage -online | % {
# Get the main app package location using the manifest
$loc = Split-Path ( [Environment]::ExpandEnvironmentVariables($_.InstallLocation) ) -Parent
If ((Split-Path $loc -Leaf) -ieq 'AppxMetadata') {
$loc = Split-Path $loc -Parent
}
# Get a pattern for finding related folders
$matching = Join-Path -Path (Split-Path $loc -Parent) -ChildPath "$($_.DisplayName)*"
$size = (Get-ChildItem $matching -Recurse -ErrorAction Ignore | Measure-Object -Property Length -Sum).Sum
# Add the results to the output
$_ | Add-Member -NotePropertyName Size -NotePropertyValue $size
$_ | Add-Member -NotePropertyName InstallFolder -NotePropertyValue $loc
$_
} | Select DisplayName, PackageName, Version, InstallFolder, Size
The PowerShell script opens a new window, that lists each application in its own row. Each app is listed with its name, package name, install folder, version and size. The size is listed in bytes. Most apps have a size of ten Megabytes and more. Some, YourPhone, Windows Store, Windows Communication Apps, or Microsoft Teams, are much larger than that.
Closing Words
Microsoft should readjust the size readings in the Apps listing of the Settings application, as the small sizes of the installed apps give users and administrators an incorrect impression.
Now You: do you remove preinstalled apps on your machines? (via Deskmodder)
Recommended Comments
There are no comments to display.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.