Find below the quick and efficient solution

No need to go to registry and seek for the hives to adjust their values.

  1. Use your favourite text or code editor and create new Powershell file type.
  2. The script can be used later on, anytime, when the Teams got stuck on its startup.
  3. Place the 3 lines of the code below and save the file having the file extension "ps1".

$UserProfilePath = $env:USERPROFILE
taskkill /IM ms-teams.exe /F
Remove-Item $UserProfilePath\AppData\Roaming\Microsoft\Teams\* -Recurse -Force

  • The first line of the script is recognize the path of your user profile for further usage. This path is stored in the variable.
  • The second line of the code simply kills the task with the name "ms-teams.exe" (the previous versions of MS Teams were named only like teams.exe"),
  • The third line recursively cleanup the files in specified folders and subfolders. The Force attribute is used not to be asking for any confirmation queries. Make sure, that variable $UserProfilePath contains valid path to your User Profile Path.
  • Once the run of the script is finished, you can run the Teams application again, and now it starts swiftly without any hassle.