This causes the following function:
to fail, because the class Microsoft.TeamFoundation.Client.TfsClientCredentials no longer exists.
This has been replaced by Microsoft.VisualStudio.Services.Client.VssClientCredentials from assembly: Microsoft.VisualStudio.Services.Client.Interactive.
The Get-TfsClientCredentials should probably test for the existence of the VssClientCredentials and use that, then fall back to TfsClientCredentials for backwards compat.