1. 程式人生 > 資訊 >報告:微軟 Win11 預設預裝應用約佔 1.6GB 磁碟空間

報告:微軟 Win11 預設預裝應用約佔 1.6GB 磁碟空間

4 月 25 日訊息,與許多作業系統一樣,微軟也在其 Windows 11、Windows 10 和其他產品中提供了一堆預設應用。Oofhours 的一份新報告就揭開了 Windows 11 中的預設應用有多大

如下圖所示,使用 PowerShell 提供的查詢功能,我們能夠計算出 Windows 11 預設應用的大小。這些應用已按大小(以位元組為單位)降序排序,可以看到 Microsoft Teams 是最大的應用,佔用了大約91MB 的空間。

然而,該查詢只是指向了XML 檔案位置,而部分應用有另一個資料夾,需要額外計算大小。比如Microsoft Store Purchase 顯示大小為 11KB,但實際大小為 37MB。

對列出的每一個應用進行檢查後發現,Windows 11 的預設預裝應用大小約為 1.6GB,小夥伴覺得多不多?

以下是在 PowerShell 中檢視所有 Windows 應用大小的指令碼,包括預設應用和從 Microsoft Store 下載的應用(需要先取消隱藏 WindowsApps 資料夾):

Get-AppxProvisionedPackage-online|%{	#Getthemainpackagelocationusingthemanifest	$loc=Split-Path([Environment]::ExpandEnvironmentVariables($_.InstallLocation))-Parent	If((Split-Path$loc-Leaf)-ieq'AppxMetadata'){		$loc=Split-Path$loc-Parent	}	#Getapatternforfindingrelatedfolders	$matching=Join-Path-Path(Split-Path$loc-Parent)-ChildPath"$($_.DisplayName)*"	$size=(Get-ChildItem$matching-Recurse-ErrorActionIgnore|Measure-Object-PropertyLength-Sum).Sum	#Addtheresultstotheoutput	$_|Add-Member-NotePropertyNameSize-NotePropertyValue$size	$_|Add-Member-NotePropertyNameInstallFolder-NotePropertyValue$loc	$_}|SelectDisplayName,PackageName,Version,InstallFolder,Size