Command line deploy an Orchard CMS website

Here's an webdeploy script for Orchard which uploads an app_offline file, deploys your website and afterwards it removes the app_offline file so the new website is taken online.

@echo off

set siteName=sitename
set user=administrator
set pass=password
set host=wmsvc='https://ipaddress:8172/msdeploy.axd?site=%siteName%',userName='%user%',password='%pass%',authtype='Basic',includeAcls='False'

set host2=computerName='https:// ipaddress :8172/msdeploy.axd?site=%siteName%',userName='%user%',password='%pass%',authtype='Basic',includeAcls='False'

set cmd=-allowUntrusted -verbose
set baseDir = "D:\sites\Orchard 1.5.1"
set source=contentPath='D:\sites\Orchard 1.5.1\build\Precompiled'
D:
cd %baseDir%
echo on

"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath='%CD%\App_Offline.htm' -dest:contentPath="%siteName%\App_Offline.htm",%host% %cmd%
"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:%source% -dest:contentPath="%siteName%\",%host2% -skip:Directory='%siteName%\\App_Data' -skip:File='%siteName%\\app_Offline.htm' -skip:Directory='%siteName%\\Media' %cmd%
"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:delete -dest:contentPath="%siteName%\app_Offline.htm",%host% %cmd%