Using Scriptblocks in PSCustomObjects

Self-documenting so I know how to do this myself later!

Words: 806

Time to read: ~ 4 minutes

tl;dr: Save your command as a [scriptblock] variable and then use .InvokeReturnAsIs method

Update: 2018-04-24 Added examples of using simple functions as well.

Continue reading “Using Scriptblocks in PSCustomObjects”

When you NEED to Declare a Table Using the OUTPUT Clause

I learned a thing myself at the end!

Words: 532

Time to read: ~ 2.5 minutes

Update: 20180417 – Added explanation of SQL Script rather than random statements.

Continue reading “When you NEED to Declare a Table Using the OUTPUT Clause”

Wait! There are JOINS in PowerShell???

And no I’m not talking about -join

Words: 278

Time to read: ~1.5 minute

Update: 2018-03-22 – Had the wrong link to Warren’s post on Join-Object; Added more examples on request.

Update: 2018-03-23 – Code and screenshot for LEFT JOIN was actually for FULL OUTER JOIN. Updated

Continue reading “Wait! There are JOINS in PowerShell???”