Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development Batch files/PowerShell Batch files & PowerShell scripts
Using CTT to modify config files for different environments
We previously tried to use msbuild to adjust configuration files for different environments. Recently I found C onfig Transformation Tool(CTT) on CodePlex and with addition of global replace using powershell it is enough and easier to do all required modifications Content of ChangeConfig.cmd: ctt s:..\web.config t:WebConfig.CTT d:..\web.config powershell.exe -command "Get-Content ..\Remoting.config | ForEach-Object { $_ -replace '//localhost/ServicesCI/', '//ServerName01/ServicesCI/' } | Set-Content ......

Posted On Sunday, December 4, 2011 10:47 PM

Batch file to Delete Old Virtual Directories.
On some servers we have many old Virtual Directories created for previous versions of our application. IIS user interface allows to delete only one in a time. Fortunately we can use IIS scripts as described in How to manage Web sites and Web virtual directories by using command-line scripts in IIS 6.0 I've created batch file DeleteOldVDirs.cmd rem rem syntax: iisvdir /delete WebSite [/Virtual Path]Name [/s Computer [/u [Domain\]User /p Password]] REM list all ......

Posted On Saturday, May 8, 2010 8:45 PM

Copyright © Michael Freidgeim | Powered by: | Join free