Accessing TFS url from PowerShell gives TF10121 error RRS feed

  • Question

  • Hi,

    1) I am trying to access TFS path from Powershell

    2) I am trying add a label to it using the tf.exe label command, but I am seeing the following error

    tf : TF10121: The path 
    '[Uri]' is 
    not found or not supported. Type or select a different path.
    At line:13 char:1
    + tf vc label $labelName [Uri]$TpcUri
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (TF10121: The pa...different path. 
       :String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError

    I am using the below script

    [Uri]$TpcUri = ''
    Write-Host $TpcUri
    $labelName = 'abc'

    Set-Alias tf "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe"

    tf vc label $labelName $TpcUri

    Can someone please help me on how to get rid of this error



    Wednesday, July 17, 2019 4:06 PM