Module Structure Preferences (and my module history)

Modules in the Olden Days Back in PowerShell 1.0 days, there were no modules.  Uphill both ways.  In 1.0, we only had script files.  That means you had a couple of choices when it came to deploying functions.  Either you put a bunch of functions in a .ps1 file and dot-sourced it, or you used …

Continue reading ‘Module Structure Preferences (and my module history)’ »

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’ »

POSH_Ado : Inside POSH_Ado_SQLServer

In a previous post I introduced the POSH_Ado “project” and explained that it is a way to use the same code-base to access several different database platforms. I illustrated it with some sample calls to a SQL Server database using the POSH_Ado_SQLServer module and promised to show the internals of the module later. The time …

Continue reading ‘POSH_Ado : Inside POSH_Ado_SQLServer’ »

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’ »