When I run the following PowerShell script directly on the 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 objects with fields AuthenticatedUserName, AuthenticatedUserDisplayName, AuthenticatedUserIdentity.
When I run the same script in a remote PowerShellTab from another computer on the same computer using the sam e credentials, these 3 fields have the following meanings:
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 job. How to use [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory] :: GetServer with credentials from Powershell
source share