You change the source folder (with all the pictures) and this script will automatically create and repair the backgrounds for Teams.
This is for Virtual Backgrounds for teams. Once you link the folder with all your pictures, running this script will upload them to the teams folder. This also has built in capabilities to repair the Microsoft/teams folder to make sure you have the proper subbranches. Once it copy/pastes the contents of the folder, the script will automatically restart teams for you. All you have to to after is set the background of teams.