Skip to content

Instantly share code, notes, and snippets.

@leekelleher
Created August 10, 2012 10:14
Show Gist options
  • Save leekelleher/3313175 to your computer and use it in GitHub Desktop.
Save leekelleher/3313175 to your computer and use it in GitHub Desktop.
Powershell script to export an Umbraco MS-SQL database
[xml]$webconfig = Get-Content "web.config"
$conn = $webconfig.configuration.appSettings.SelectSingleNode("add[@key='umbracoDbDSN']").value
& 'C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Publishing\1.4\SqlPubWiz.exe' script -C "$conn" umbracoDbDSN.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment