What powers do I have to give in order to get this job?
$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 gets
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)
Wed http://msdn.microsoft.com/en-us/library/bb136201%28v=vs.80%29.aspx
The background is what I want to call it in a remote PowerShell session, and for some reason I don't understand
$tfsServer = [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer($basePath)
gives
"TF30063: You do not have permission to access mytfs \ MccCollection."
source share