Accessing TFS from Powershell

Posted by w4ymo on Stack Overflow See other posts from Stack Overflow or by w4ymo
Published on 2010-06-10T10:45:11Z Indexed on 2010/06/14 10:52 UTC
Read the original article Hit count: 518

Filed under:
|
|

Hello

I am new to PowerShell and I am trying to get branches from TFS and merge them using a PowerShell script. Unfortunately I am failing a first hurdle.

I do have Visual Studio 2010 install on my local machine and can access the TFS server (also 2010) fine.

I am running the script from my local machine and have the following lines:

$tfs = get-tfs http://TFSServerName:8080/TFSProject
$branchfolders = $tfs.VCS.GetItems('$/Dev/Branches/', $tfs.RecursionType::OneLevel)

and I receive the following error on the second line 2 above

Exception calling "GetItems" with "2" argument(s): "Unable to connect to the remote server"

I have configured the TFS server to accept incoming connections on port 8080 which works but I am now not to sure how to resolve this error. Is further configuration required?

Thanks for any help given.

© Stack Overflow or respective owner

Related posts about powershell

Related posts about build-process