Home >Common Problem >Default Windows 11 app sizes are much larger than reported
Microsoft’s Windows 11 operating system includes dozens of default apps that are available by default after first-run installation. Some of these apps offer core functionality such as photo viewing, media playback, or plain text editing. Others have a narrow focus and are only useful to a small subset of Windows users.
Many pre-installed packages can be removed from a Windows computer through Settings > Applications, PowerShell commands, or using programs such as winget, Windows Packet Manager, etc. app. These applications take up disk space, and some administrators may wish to delete them to free up space on the drive. Administrators encounter obstacles when determining the actual size occupied by these applications. Settings > App List is useless for this, as many default Windows apps are only listed with a size of a few KB.
The same goes for when you run regular PowerShell commands that return a list of applications.
PowerShell scripts are available for download. Just download the zip archive to your local system and unzip it to get started.
Use the Start menu to launch an elevated PowerShell prompt, navigate to the folder where the script is stored, and run .\Get-AppSizes.ps1 -online | Out-GridView to get the output.
Please note that you need to allow third-party scripts to execute and select "Run Once" when prompted to run. Cautious users might review the code before running the script to ensure it will run safely.
Get-AppxProvisionedPackage -online | % {# Get the main app package location using the manifest$loc = Split-Path ( [Environment]::ExpandEnvironmentVariables($_. InstallLocation) ) -Parent<br>If ((Split-Path $loc -Leaf) -ieq 'AppxMetadata') {<br>$loc = Split-Path $loc -Parent<br>}<br># Get a pattern for finding related folders<br>$matching = Join-Path -Path (Split-Path $loc -Parent) -ChildPath "$($_.DisplayName)*"<br>$size = (Get-ChildItem $matching -Recurse -ErrorAction Ignore | Measure-Object -Property Length -Sum).Sum<br># Add the results to the output<br>$_ | Add-Member -NotePropertyName Size -NotePropertyValue $size<br>$_ | Add-Member -NotePropertyName InstallFolder -NotePropertyValue $loc<br>$_<br>} | Select DisplayName, PackageName, Version, InstallFolder, Size<br><br>
The PowerShell script opens a new window in its own Each application is listed in a row. Each application is listed with its name, package name, installation folder, version, and size. Sizes are listed in bytes. Most applications are ten megabytes or more in size. Some, YourPhone, Windows Store, Windows Communication Apps or Microsoft Teams, are much bigger than that.
The above is the detailed content of Default Windows 11 app sizes are much larger than reported. For more information, please follow other related articles on the PHP Chinese website!