forked from Hypfer/SilenTeams
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SilenTeamsInstaller.ps1
22 lines (17 loc) · 1.09 KB
/
SilenTeamsInstaller.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$TeamsCurrentPath ="$env:LOCALAPPDATA\Microsoft\Teams\current"
Write-Output "Welcome to the SilenTeams installer"
Write-Output "Please make sure to exit teams before running this"
if(Test-Path $TeamsCurrentPath) {
Write-Output "Downloading fake dbghelp.dll"
$latestRelease = Invoke-WebRequest https://api.github.com/repos/Hypfer/SilenTeams/releases/latest -UseBasicParsing -Headers @{"Accept"="application/json"}
$json = $latestRelease.Content | ConvertFrom-Json
Invoke-WebRequest $json.assets.browser_download_url -UseBasicParsing -OutFile $(Join-Path "$TeamsCurrentPath" $json.assets.name)
Write-Output "Downloaded fake dbghelp.dll"
Write-Output "Copying real dbghelp.dll"
Copy-Item "C:\Windows\System32\dbghelp.dll" $(Join-Path "$TeamsCurrentPath" "dbghelp_orig.dll") -Force
Write-Output "Copied real dbghelp.dll"
Write-Output "Enjoy not being annoyed by Teams anymore"
Write-Output "Please note that you will need to rerun this script every time Teams decides to update itself"
} else {
Write-Output "Couldn't find Teams install folder at "$TeamsCurrentPath
}