Skip to content

Instantly share code, notes, and snippets.

@mwrock
Created April 19, 2013 19:44
Show Gist options
  • Save mwrock/5422718 to your computer and use it in GitHub Desktop.
Save mwrock/5422718 to your computer and use it in GitHub Desktop.
Run this from the root of your workspace to use the TFS PowerTools Powershell CmdLets to exract All pending changes to a zip
Add-Type -AssemblyName System.IO.Compression.FileSystem,System.IO.Compression
$here= (Get-Item .).FullName
$archive = [System.IO.Compression.ZipFile]::Open(
(Join-Path $here "archive.zip"), [System.IO.Compression.ZipArchiveMode]::Create
)
get-tfsPendingChange | % {
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile(
$archive, $_.LocalItem, $_.LocalItem.Substring($here.Length+1)
)
}
$archive.Dispose()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment