# Adds 8 background(s) from https://behindme.onneby.com to Microsoft Teams. # Writes only to Teams' own custom-background folder for the current user. $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' $backgrounds = @( @{ Guid = '4081ead2-3e48-4686-9139-d97fc04ce4b9'; Ext = 'jpg'; Image = 'https://behindme.onneby.com/images/ebmvr8de0i.jpg'; Thumb = 'https://behindme.onneby.com/images/ebmvr8de0i_thumb.jpg' }, @{ Guid = '354f9725-0e82-4705-9707-4fd5b857b1a1'; Ext = 'jpg'; Image = 'https://behindme.onneby.com/images/4ot4jgclom.jpg'; Thumb = 'https://behindme.onneby.com/images/4ot4jgclom_thumb.jpg' }, @{ Guid = '214b6044-094f-49ac-8b6e-198629c67f1e'; Ext = 'jpg'; Image = 'https://behindme.onneby.com/images/h2h46j94e8.jpg'; Thumb = 'https://behindme.onneby.com/images/h2h46j94e8_thumb.jpg' }, @{ Guid = 'bf085683-a35f-42c2-a30b-1b474afe953f'; Ext = 'jpg'; Image = 'https://behindme.onneby.com/images/dm1fo17efd.jpg'; Thumb = 'https://behindme.onneby.com/images/dm1fo17efd_thumb.jpg' }, @{ Guid = 'd1e7d966-1e92-4d31-868d-ecfcf2973ed2'; Ext = 'jpg'; Image = 'https://behindme.onneby.com/images/dkgq0rn9id.jpg'; Thumb = 'https://behindme.onneby.com/images/dkgq0rn9id_thumb.jpg' }, @{ Guid = '568d56ba-3e0a-488d-b5d9-495b78899263'; Ext = 'jpg'; Image = 'https://behindme.onneby.com/images/gzebiy85e8.jpg'; Thumb = 'https://behindme.onneby.com/images/gzebiy85e8_thumb.jpg' }, @{ Guid = '5d2980b5-d53f-473a-bddf-461d79ee07f7'; Ext = 'jpg'; Image = 'https://behindme.onneby.com/images/l6eddgt782.jpg'; Thumb = 'https://behindme.onneby.com/images/l6eddgt782_thumb.jpg' }, @{ Guid = 'c2d23cca-6c67-43c7-b91a-aaaf5a697d00'; Ext = 'jpg'; Image = 'https://behindme.onneby.com/images/57bhj9j2nt.jpg'; Thumb = 'https://behindme.onneby.com/images/57bhj9j2nt_thumb.jpg' } ) $targets = @( # New Teams (2023+) @{ App = (Join-Path $env:LOCALAPPDATA 'Packages\MSTeams_8wekyb3d8bbwe'); Dir = (Join-Path $env:LOCALAPPDATA 'Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Backgrounds\Uploads') }, # Classic Teams @{ App = (Join-Path $env:APPDATA 'Microsoft\Teams'); Dir = (Join-Path $env:APPDATA 'Microsoft\Teams\Backgrounds\Uploads') } ) $installed = 0 foreach ($target in $targets) { if (-not (Test-Path $target.App)) { continue } New-Item -ItemType Directory -Force -Path $target.Dir | Out-Null foreach ($bg in $backgrounds) { Invoke-WebRequest -UseBasicParsing -Uri $bg.Image -OutFile (Join-Path $target.Dir "$($bg.Guid).$($bg.Ext)") Invoke-WebRequest -UseBasicParsing -Uri $bg.Thumb -OutFile (Join-Path $target.Dir "$($bg.Guid)_thumb.$($bg.Ext)") } Write-Host "Added $($backgrounds.Count) background(s) to $($target.Dir)" $installed++ } if ($installed -eq 0) { Write-Warning "Couldn't find Microsoft Teams for this user. Download the image instead and use 'Add new' under Backgrounds in a meeting." } else { Write-Host "Done. In Teams, start or join a meeting (Calendar > Meet now works) and open the background effects next to the camera switch. Quit and reopen Teams if they don't show up yet." }