Comments on: Automate SQL Server Express Backups with Powershell https://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/ Thomas LaRock is an author, speaker, data expert, and SQLRockstar. He helps people connect, learn, and share. Along the way he solves data problems, too. Tue, 21 Aug 2018 15:01:11 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: ThomasLaRock https://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/#comment-16022 Thu, 22 Jun 2017 16:22:00 +0000 http://thomaslarock.com/?p=8892#comment-16022 In reply to Nakah.

Wow, not sure how I missed that, thanks for finding that!

]]>
By: Nakah https://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/#comment-16020 Thu, 22 Jun 2017 10:28:00 +0000 http://thomaslarock.com/?p=8892#comment-16020 Thanks for the script. There is one little bug on the following line: { $dest = $inst.Settings.BackupDirectory + “” };
It should be: { $dest = $srv.Settings.BackupDirectory + “” };

]]>
By: ThomasLaRock https://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/#comment-7522 Wed, 14 Nov 2012 20:32:00 +0000 http://thomaslarock.com/?p=8892#comment-7522 In reply to Chris Tracy.

Thanks Chris!

]]>
By: Chris Tracy https://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/#comment-7521 Wed, 14 Nov 2012 14:58:00 +0000 http://thomaslarock.com/?p=8892#comment-7521 You can use this to get assembly version (11 for SQL 2012):

$v.GetName().Version

I think you can replace this line:

if ((($v.FullName.Split(‘,’))[1].Split(‘=’))[1].Split(‘.’)[0] -ne ‘9’) {

with this:

if ($v.GetName().Version -ne ‘9’) {

]]>
By: fgdlfiugh https://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/#comment-16162 Fri, 05 Oct 2012 10:04:00 +0000 http://thomaslarock.com/?p=8892#comment-16162 iug9et8ug gm

]]>
By: ThomasLaRock https://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/#comment-7085 Fri, 06 Jul 2012 20:33:00 +0000 http://thomaslarock.com/?p=8892#comment-7085 In reply to John Bates.

John,

The Backup-SqlDatabase cmdlet comes from SQL2012, I believe. I think you may be able to get it with earlier versions, you just need to add that function into the SQLPS module and then import. But I haven’t tried to make that work.

]]>
By: Jane https://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/#comment-7084 Fri, 06 Jul 2012 09:43:00 +0000 http://thomaslarock.com/?p=8892#comment-7084 In reply to John Bates.

As far as I can tell, the new script needs to be on SQL2012 (edit: or a server with SSMS2012): the Backup-SQLDatabase cmdlet is a 2012 enhancement. So far, the original script runs happily on SQL 2008. Haven’t attempted SQL 2005 (can’t remember if any of my Express servers are SQL 2005 off the top of my head).

]]>