У меня проблема с подключением powershell к VTFS (облачной базе).Мой сценарий работал годами.Не уверен, что случилось, кроме обновлений, которые я запускал от Microsoft, и думаю, что это проблема.Этот скрипт без проблем запускался в апреле до обновления Microsoft.
I get the following error trying to connect, which generally makes a popup appear for my credentials to Online Visual Studios.
if ( (Get-PSSnapin -Name Microsoft.TeamFoundation.PowerShell) -eq $null )
{
Add-PSSnapin Microsoft.TeamFoundation.PowerShell
}
# Variables - CHECK EACH TIME
[string] $tfsServerLocationPath = "https://name.visualstudio.com/DefaultCollection"
[string] $ProjectLocationToSearch = "$/Project/blabla/"
[string] $outputFile = "c:\temp\RetrievedFiles.txt"
[string] $dateRange = "D2018-04-18 00:00:00Z~"
[bool] $openOutputFile = $true
$AutoDeployDir = "$/Project/blabla/"
$deployDirectory = "C:\Temp\ReleaseTest\DeployFiles\"
$tfsCollection = New-Object -TypeName Microsoft.TeamFoundation.Client.TfsTeamProjectCollection -ArgumentList $tfsServerLocationPath
$tfsVersionControl = $tfsCollection.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer])
**AFTER THIS LINE IS WHEN THE ERROR APPEARS.**
[Microsoft.TeamFoundation.Client.TfsTeamProjectCollection] $tfs = get-tfsserver $tfsServerLocationPath
get-tfsserver : Key not valid for use in specified state.
At line:31 char:67
+ [Microsoft.TeamFoundation.Client.TfsTeamProjectCollection] $tfs = get-tfsserver ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-TfsServer], CryptographicException
+ FullyQualifiedErrorId : GetTfsServer,Microsoft.TeamFoundation.PowerTools.PowerShell.GetTf
sServerCommand
Thank You in Advance.