cls Set-Alias notepad++ "C:\Program Files (x86)\Notepad++\notepad++.exe" Set-Alias tfs "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\TF.exe" Set-Location "S:\Pluto\Development\Database\Logging" $files = gci -include sp*.sql -Recurse | Where-Object { $_.fullname -notmatch 'bin' } | select Directory, Name <# Check Out foreach ($file in $files) { $path = "$($file.Directory)\$($file.Name)"; tfs get $path; tfs checkout $path /lock:none; notepad++ $path } #> <# Check In $comment = "Reset working scripts after prod deployment."; foreach ($file in $files) { $path = "$($file.Directory)\$($file.Name)"; tfs get $path; tfs checkin $path /comment:$comment /noprompt; } #>