![]() In a TFS 2015 Build Definition on the server in location #2 A server with OS: Windows Server 2012 R2ģ. locally on my machine during initial development of the scripts and testingĢ. I'm running this script in three locations:ġ. Write-Output "ERROR: Downloading file: $itemFullName to: $path failed exception message: $exceptionMessage" $tfsVersionControl.DownloadFile($itemFullName, $path) Write-Output "INFO: Downloading file: $itemFullName to: $path" $path = $itemFullName.Replace($locationToSearch, "$sourceFolder\") $items = Get-TfsItemHistory -HistoryItem $locationToSearch -Recurse -Server $tfs -Version '1084892~1084927' -IncludeItems | $locationToSearch = "$/$TeamProjectName/" $tfsVersionControl = $tfsCollection.GetService() $tfsCollection = New-Object -TypeName -ArgumentList $tfsCollectionPath $tfsCollectionPath = ' $tfs = Get-TfsServer $tfsCollectionPath Write-Output "INFO: Directory: $directory successfully created."Īdd-PSSnapin New-Item -Path $directory -ItemType Directory -Force -Verbose -ErrorVariable exClear -ErrorAction Stop Write-Output "INFO: Directory: $directory does not exist, so it is being created." Remove-Item -Path "$directory\*" -Recurse -Force -Verbose -ErrorVariable exClear -ErrorAction Stop Write-Output "INFO: Clearing directory: $directory" If ((Test-Path -Path $directory -PathType Container)) The script is as follows: function Clear-Folder I have a PS script that I wrote that downloads files from source control from a team project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |