Which kind of credentials must I provide, to get this working
$tfsServer = [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer($basePath,$credential)
I tried:
$credential = New-Object System.Management.Automation.PsCredential($user,$password)
and
$credential = New-Object System.Net.NetworkCredential($user, $password, $domane)
and always got
Für "GetServer" und die folgende Argumenteanzahl kann keine Überladung gefunden werden: "2".
Bei Zeile:18 Zeichen:86
+ $tfsServer = [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer <<<< ($basePath,$credential)
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest
I want to use
TeamFoundationServerFactory.GetServer Method (String, ICredentialsProvider)
cf. http://msdn.microsoft.com/en-us/library/bb136201%28v=vs.80%29.aspx
The background is, that I want to call this in a remote PowerShell session and for some reason, I do not understand
$tfsServer = [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer($basePath)
yields
"TF30063: You are not authorized to access mytfs\MccCollection."