SQL PASS PowerShell Session Materials

  The presentation and scripts can be found here. Two questions came up which I couldn’t answer on the spot: 1) what is the load precedence of profiles and 2) what PowerShell books would I recommend.   Profile Load Precedence http://msdn.microsoft.com/en-us/library/bb613488(v=VS.85).aspx The profiles are listed in load order. The most specific profiles have precedence over…


Loading SQL Server Snapins into your PowerShell Session

Caveat: I don’t write code for a living. But I do know how to get things done, usually using brute force. SQLPS.exe is a decent environment, but sometimes I want to work in the default PowerShell environment. But if I want to work with SQL Server in the default PowerShell shell it means I need…


Using PowerShell to Get Data & Log File Sizes

I was playing around with PowerShell today (yes I’m was geeking out on Saturday afternoon) to learn how to access Performance Counters using PowerShell. My mission was to write a script that would return the Data File and Log File sizes for each database and a total for the instance. The good news is SQL…


PowerShell vs. T-SQL or Why Did We Add PowerShell Support in SQL2K8

The following write-up was originally an email I sent to Allan White (SQL Server MVP) in the context of a discussion on PowerShell and some of the PowerShell community postings questioning why SQL Server needed PowerShell support @ all given the strength of T-SQL. Allan and others encouraged me to post the response. I realize…


TechEd North America Session Videos

In shameless self promotion the video of the talk I did on PowerShell and SQL Server has been posted to the web. I haven’t watched this as I just can’t bring myself to sit and watch myself for an hour but the session evaluations were pretty good. Therefore I think the odds are pretty good…


Launching Vanilla PowerShell from SSMS

One of the criticisms of our PowerShell implementation is the integration with Management Studio launches our custom minishell. With just a few simple key strokes you can add a custom tool menu item and toolbar button. To do this select "External Tools…" from the "Tools" menu in Management Studio.   The following dialog is displayed….

The SQLPS Firestorm Part Duex

On the PowerShell team’s blog Architect Jeffrey Snover addresses the recent firestorm on SQLPS. BTW: he was a lot nicer about the engagement model than I would have been. I do want all feedback, positive and critical. Just make it constructive. Getting nasty and throwing insults just makes you look like an idiot and ensures…


The SQLPS Firestorm

Within the PowerShell community there’s a firestorm raging over SQLPS.exe our mini-shell that we’re introducing in SQL2K8. In his blog Michiel does a good job explaining the mini-shell and provides a script you can use to register the SQL Server provider extensions in a vanilla PS environment. I love it when people who obviously have…


TechEd 2008 is Done!

I’m writing this on the plane from Orlando back to Seattle. I have lots of thoughts on TechEd that I’ll try to get through before I run out of battery or the guy in front of me snaps my laptop display. I also want to answer a few of the questions that came up that…

PowerShell Resources

  SQL Server Books Online PowerShell Overview SQL Server PowerShell Help SQL Server Learning PowerShell PowerShell Team MSDN PowerShell Site PowerShell Team Blog Cheat Sheet (This is Great!) Books Windows PowerShell in Action by Bruce Payette Windows PowerShell Cookbook by Lee Holmes Other PowerShell Script Center on TechNet Buck Woody’s Blog