The Two Faces of the ISE Run Button (and a bit of bonus evil)

I love the ISE. I’ve used other “environments”, but always end up using the good old ISE. I do use the awesome ISESteroids module by Tobias Weltner (powertheshell.com), but most of the time you can find me in the unadorned, vanilla ISE. With that bit of disclaimer out of the way, there is something that …

Continue reading ‘The Two Faces of the ISE Run Button (and a bit of bonus evil)’ »

PowerShell and MySQL : POSH_Ado_MySQL

Using PowerShell and MySQL together with POSH_Ado is just as easy as SQL Server. You’ll need the POSH_Ado and POSH_Ado_MySQL Modules, and use this command to get started: Once you’ve done that you’ll have the following functions at your disposal: New-MySQLCommand New-MySQLConnectionString New-MySQLCommand Invoke-MySQLCommand Invoke-MySQLQuery Invoke-MySQLStoredProcedure These functions work just like the ones for SQLServer …

Continue reading ‘PowerShell and MySQL : POSH_Ado_MySQL’ »

Breaking the rules with helper functions

One of my most popular answers on StackOverflow is also one which has a tiny bit of controversy. It involves how to “hide” helper functions in a module in order to keep them from being exported. Export-ModuleMember Details In case you’re unfamiliar with how exporting functions from a module works, here are the basic rules: …

Continue reading ‘Breaking the rules with helper functions’ »

Getting Started with POSH_Ado

This is kind of long-winded, if you want, skip down to the code and it should be clear (I hope). Where the story starts As I mentioned here, the original adolib module got copied a few times and with cut-and-paste programming got turned into modules for other database platforms. While it was cool that it …

Continue reading ‘Getting Started with POSH_Ado’ »

Executing SQL the right way in PowerShell (revisited)

Almost 6 years ago I wrote this post about how I thought you should go about executing SQL statements and queries in PowerShell. It included a function which allowed you to pass a hashtable of parameter names and values.  This post has been one of the most popular on the site. I submitted a module to …

Continue reading ‘Executing SQL the right way in PowerShell (revisited)’ »

Cleaning the Path – A PowerShell One-liner

I’m not super crazy about writing one-liners in PowerShell, but I ran across a fun problem which was quick to write as a one-liner.  I’ll give that here with a little explanation, and follow up in a couple of days with a more polished advanced function solution. Anyway, the problem was that I was working …

Continue reading ‘Cleaning the Path – A PowerShell One-liner’ »