MicrosoftTeams
Appsv3
Author: Matt Dawson and Andrew Rathbun
description
Microsoft Teams
paths
5 paths
› paths use Windows environment syntax
collection commands
# PowerShell Artifact Collection Script
# Target: MicrosoftTeams
# Run as Administrator
#Requires -RunAsAdministrator
$ErrorActionPreference = "SilentlyContinue"
$DestBase = "D:\Evidence"
# Function to handle artifact collection with robocopy
function Collect-Artifact {
param (
[string]$SourceDir,
[string]$FolderName,
[string]$FileMask = "*"
)
$FullDest = Join-Path -Path $DestBase -ChildPath $FolderName
robocopy "$SourceDir" "$FullDest" "$FileMask" /E /COPY:DAT /R:0 /W:0 /NP /NFL /NDL /NJH /NJS | Out-Null
}
# 1. Microsoft Teams IndexedDB Cache
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\Microsoft\Teams\IndexedDB\https_teams.microsoft.com_0.indexeddb.leveldb\"
Collect-Artifact -SourceDir "$UserPath" -FolderName "Microsoft_Teams_IndexedDB_Cache"
# 2. Microsoft Teams Local Storage Cache
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\Microsoft\Teams\Local Storage\leveldb\"
Collect-Artifact -SourceDir "$UserPath" -FolderName "Microsoft_Teams_Local_Storage_Cache"
# 3. Microsoft Teams Cache
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\Microsoft\Teams\Cache\"
Collect-Artifact -SourceDir "$UserPath" -FolderName "Microsoft_Teams_Cache"
# 4. Microsoft Teams Config
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\Microsoft\Teams\"
Collect-Artifact -SourceDir "$UserPath" -FileMask "desktop-config.json" -FolderName "Microsoft_Teams_Config"
# 5. Microsoft Teams Logs (Windows 11)
Collect-Artifact -SourceDir "C:\Users\%User%\AppData\Local\Packages\MicrosoftTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs" -FolderName "Microsoft_Teams_Logs__Windows_11_"
Write-Host "Collection complete!" -ForegroundColor Green› Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1