AppXPackages
Windowsv1
Author: Nisarg Suthar
description
AppXPackages
paths
5 paths
AppsWindowsApps for AppX
C:\Program Files\WindowsApps\Deleted*\Locates all the user AppX package directories which were installed through Microsoft Store and updated/uninstalled by the user.
AppsSystemApps for AppX
C:\Windows\SystemApps\Locates all the system AppX package directories which were installed by the system.
AppsUserSpecificPackages for AppX
C:\Users\%user%\AppData\Local\Packages\Locates all the user and system AppX package directories which are user specific on the system.
AppsAppRepository for AppX
C:\ProgramData\Microsoft\Windows\AppRepository\Packages\StateRepository-*.srdLocates the StateRepository .srd databases.
AppsProgramData Packages for AppX
C:\ProgramData\Packages\Locates the ProgramData AppX package directories.
› paths use Windows environment syntax
collection commands
# PowerShell Artifact Collection Script
# Target: AppXPackages
# Run as Administrator
#Requires -RunAsAdministrator
$ErrorActionPreference = "SilentlyContinue"
$DestBase = "D:\Evidence"
# Function to handle directory creation and copying
function Collect-Artifact {
param (
[string]$SourcePath,
[string]$FolderName
)
$FullDest = Join-Path -Path $DestBase -ChildPath $FolderName
if (-not (Test-Path -Path $FullDest)) {
New-Item -ItemType Directory -Path $FullDest -Force | Out-Null
}
Copy-Item -Path $SourcePath -Destination $FullDest -Recurse -Force
}
# 1. WindowsApps for AppX
Collect-Artifact -SourcePath "C:\Program Files\WindowsApps\Deleted*\\*" -FolderName "WindowsApps_for_AppX"
# 2. SystemApps for AppX
Collect-Artifact -SourcePath "C:\Windows\SystemApps\\*" -FolderName "SystemApps_for_AppX"
# 3. UserSpecificPackages for AppX
$UserPath = Join-Path $env:USERPROFILE "AppData\Local\Packages\"
Collect-Artifact -SourcePath "$UserPath\*" -FolderName "UserSpecificPackages_for_AppX"
# 4. AppRepository for AppX
Collect-Artifact -SourcePath "C:\ProgramData\Microsoft\Windows\AppRepository\Packages\\StateRepository-*.srd" -FolderName "AppRepository_for_AppX"
# 5. ProgramData Packages for AppX
Collect-Artifact -SourcePath "C:\ProgramData\Packages\\*" -FolderName "ProgramData_Packages_for_AppX"
Write-Host "Collection complete!" -ForegroundColor Green› Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1