Category Archives: PowerShell and SQL Server

Capacity planning series finished

My capacity planning series on the Scripting Guy blog finished last week. Didn’t get chance to post about it as I was at Microsoft in Seattle. Full series and associated powertip postings: http://blogs.technet.com/b/heyscriptingguy/archive/2013/11/18/powertip-compare-the-contents-of-files-with-powershell.aspxhttp://blogs.technet.com/b/heyscriptingguy/archive/2013/11/18/the-admin-s-first-steps-capacity-planning-part-3.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2013/11/11/powertip-use-powershell-to-format-dates.aspxhttp://blogs.technet.com/b/heyscriptingguy/archive/2013/11/11/the-admin-s-first-steps-capacity-planning-part-2.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2013/11/04/powertip-view-network-statistics-with-powershell.aspxhttp://blogs.technet.com/b/heyscriptingguy/archive/2013/11/04/the-admin-s-first-steps-capacity-planning.aspx Enjoy

Posted in Office 2013, Powershell, PowerShell and SQL Server, PowerShell and WMI | Leave a comment

Loading the SQLPS module

Loading the SQLPS module gives you quick access to the sql cmdlets, sql provider and the SMO assemblies. It also, infuriatingly, moves your location into the sql provider. I (really) *  (lots ) hate things that assume what I want … Continue reading

Posted in PowerShell and SQL Server | 2 Comments

SMO with SQL Server 2012

I’ve been working quite a bit with PowerShell and SQL Server 2012 just recently. In earlier versions of SQL Server you had to load the SMO assemblies to get access to the admin functionality. In SQL Server 2012 – import-module … Continue reading

Posted in PowerShell and SQL Server | 2 Comments

Dropping a database

A question came up on the forum regarding dropping a database & I realised it was something I hadn’t done before. SMO provides a set of classes for managing SQL Server. You get SMO when you install the SQL Server … Continue reading

Posted in PowerShell and SQL Server | Leave a comment

PowerShell in Practice offer today only

Manning have PowerShell in Practice on a half price offer today. Go to http://www.manning.com and use code dotd0330cc when ordering

Posted in Books, Powershell, PowerShell and Active Directory, PowerShell and Exchange 2007, PowerShell and IIS, PowerShell and SQL Server, PowerShell and WMI | Leave a comment

UK PowerShell group–February 2012 recording

The recording, slides and demo scripts from tonight’s PowerShell and SQL Server session are available as a single zip file for download from https://skydrive.live.com/#cid=43CFA46A74CF3E96&id=43CFA46A74CF3E96%212943 The file is created with jzip but any zip handling program should be able to unzip … Continue reading

Posted in PowerShell and SQL Server, PowerShell User Group | Leave a comment

Connecting via SMO to a named instance

A question came up in tonight’s User group session regarding connecting to SQL server instances using SMO If you have just a default instance – just give the server name $server = New-Object -TypeName “Microsoft.SqlServer.Management.Smo.Server” -ArgumentList “W08R2SQl12” If you have … Continue reading

Posted in PowerShell and SQL Server | 1 Comment