Need command to get a file from TFS without a workspace Need command to get a file from TFS without a workspace powershell powershell

Need command to get a file from TFS without a workspace


rem tf.exetf view $/path/to/file.txt /version:1234 > %temp%\file.txt# powershell$tfs = get-tfsserver $hostName -all$tfs.vcs.DownloadFile($serverPath, $fileName)# even better: manipulate entirely in-memory$item = $tfs.vcs.GetItem($serverPath)  # tons of GetItem(s) overloads available$contents = ( [io.streamreader]$item.DownloadFile() ).ReadToEnd()$contents | ? { some-condition } | do-coolstuff