Last active
September 8, 2016 14:57
-
-
Save alatas/866ce0a26e5fd8c59e938ebbfcde1c20 to your computer and use it in GitHub Desktop.
Remove TFS related files and unbind solution files from TFS (Powershell)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem *.vspscc -Recurse | %{Write-Host "Deleting *.vssscc -> "$_.FullName ; Remove-Item $_.FullName -Force};Get-ChildItem *.vssscc -Recurse | %{Write-Host "Deleting *.vspscc -> "$_.FullName ; Remove-Item $_.FullName -Force};Get-ChildItem *.sln -Recurse | %{$name=$_.FullName ; Write-Host "Changing *.sln -> "$name ; Copy-Item $name $name".bak" -Force ; (Get-Content $name -Raw) | %{$_ -replace "(?s)\tGlobalSection\(TeamFoundationVersionControl\).*?EndGlobalSection","" }| Set-Content $name -Encoding UTF8 -Force ; Write-Host "Backup File -> "$name".bak"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment