When I run the following PowerShell script directly on a machine
Add-Type -Path "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.VersionControl.Client.dll"
$basePath = "http://magv-dev-tfs:8080/tfs/MccCollection"
[Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer($basePath)
I get an objects, with the fields AuthenticatedUserName, AuthenticatedUserDisplayName, AuthenticatedUserIdentity set.
When I run the same script in a remote PowerShellTab from some other machine on the same machine using the sam e credentials, then these 3 fields are emply:
AuthenticatedUserName :
AuthenticatedUserDisplayName :
AuthenticatedUserIdentity :
Uri : http://my-tfs:8080/tfs/mcccollection
TimeZone : System.CurrentSystemTimeZone
InstanceId :
Name : my-tfs\MccCollection
Credentials : System.Net.SystemNetworkCredential
Culture : de-DE
SessionId : 7c76a150-f681-4b3c-9b0d-2836a3a5a908
ClientCacheDirectoryForInstance :
HasAuthenticated : False
TfsTeamProjectCollection : magv-dev-tfs\MccCollection
Edit:
At least I found a work around How to use [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer with credential from Powershell