You may want to sometimes satisfy the needs of your team, specially PMs, requesting already available information in document format. Some managers are lazy to go and explore (that's why they choose to be managers not techies) and they sometimes expect information to be delivered to their hands . List of Team projects in each collection can easily be seen on the TFS web interface or in VSTS in admin mode. But here is a PowerShell script to generate the same list as HTML file with link to the relevant team project, if someone requested you to have it as a separate document.
To execute this PowerShell in VSTS or TFS 2017 or 2018 you can create a Persona Access Token (PAT) with all scopes (all scopes required here to enable access to collection level information). You can call the script with you VSTS account as shown below.
.\GetAllProjects.ps1 -tfsUri 'https://youraccount.visualstudio.com' -token 'xxxxxxxxPATxxxxxxxxxxxxxx'
To call the script for TFS on premise 2017, 2018 you can use either of below depending on your TFS is setup with SSL.
.\GetAllProjects.ps1 -tfsUri 'https://yourtfs/tfs' -token 'xxxxxxxxPATxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
If you are using the TFS 2015 then modify the script as shown below to enable username password authentication as there is no PAT support. Instead of PAT user name password should be taken as parameters and credential object created instead of header.
Then you can call the script in the following format.
.\GetAllProjects.ps1 -tfsUri 'https://yourtfs/tfs' -User 'yourdomain\username' -Password 'password'