Once our three-tier website scheme is set up, the next step is to configure the content promotion method. This recipe shows how to promote content between the various environments.
This recipe assumes the development/staging/production website configuration created in the prior recipe.
Carry out the following steps to promote content in websites:
Copy the content between the web servers:
Copy-Item -Path \\web1\wwwDev -Destination \\web2\wwwDev -Verbose -Recurse -Force
Copy the files from development to staging:
Invoke-Command -ComputerName web1, web2 -ScriptBlock { Copy-Item -Path C:\inetpub\wwwDev -Destination C:\inetpub\wwwStage -Verbose -Force -Recurse }
Copy files from staging to production:
Invoke-Command -ComputerName web1, web2 -ScriptBlock { Copy-Item -Path C:\inetpub\wwwStage -Destination C:\inetpub\wwwRoot -Verbose -Force -Recurse }