How to Call Functions in Powershell – The Right Way

How to Call Functions in Powershell – The Right Way This applies when your function is in a different file than the program you are running. How do you proplery “include” functions in other files and directories? My secret is to use the $PSScriptRoot built-in variable.  If you don’t fully qualify the path, then I’ve […]

How Call a SQL Stored Procedure from Powershell

How Call a SQL Stored Procedure from Powershell This blog discusses how to call a stored procedure that takes several input parms, but doesn’t return any data. For instance, you are calling a stored proc to insert data into one or more database tables. When you are not expecting data back, you don’t need the […]

How to Validate User Data Values in an XML Config File with Powershell

Validate User Data Values in an XML Config File with Powershell This blog discusses how I decided to validate user data in an XML Config file. I’ve been creating a rather involved Powershell program that automates the creation of videos and posting them to our team’s video site, in order to create points that could […]

Oracle 11g XE Web Interface

Intro to Oracle for SQLServer Developers and DBAs – Part 3 After finally getting the GUI “SQL Developer” tool installed, see earlier blog Intro to Oracle SQL for SQL Server Developers and DBAs, I one day noticed an Oracle Icon on my desktop, clicked it, and found the web interface for managing Oracle. I’ve seen […]

Capturing Text using RegEx in Powershell

Regular expressions go all the way back to 1956. I think I first saw them in the PERL language; but today in 2015, they are very useful in Powershell, C# and most every language. Regular Expressions have three main purposes: 1. Validate if text conforms to a pattern 2. Capture (extract) a string (or series […]

Intro to Oracle for SQLServer Developers and DBAs – Part 2

Intro to Oracle for SQLServer Developers and DBAs 1. Oracle has something called V$ tables, which are essential similar to the Dynamic Management View (DMV) of SQLServer, Here are two examples: select * from v$database; select * from v$thread; Result – this shows that my 11g Express Edition has both an instance name of “xe” […]

Intro to Oracle SQL for SQL Server Developers and DBAs – Part 1

Intro to Oracle SQL for SQL Server Developers and DBAs This is an Intro to Oracle SQL for SQLServer Developers and DBAs, and probably Part 1 of several blogs that I will write as I learn more, and make  more newbie mistakes.  You probably already know that Microsoft implementation (or extension) of the “standard” SQL […]

How to Add and Delete MSMQ Queues from Powershell

This blog shows you how to How to Add and Delete MSMQ Queues from Powershell, programmatically, via a simple re-usable function. I used the code from this blog as a base: http://blogs.msdn.com/b/sajay/archive/2010/03/18/powershell-script-to-create-an-msmq.aspx. His code is fine, but it’s from an administrators perspective, i.e. run this Powershell, pass it some parms. I wanted the same code […]

Powershell – How to get last line of file (and parse it from CSV)

How to Get the Last Line of a File Have you ever needed to read just the last line of a file (i.e. “the last row”) in Powershell? It’s easier than I thought. If you ask for the last several rows (as shown in the commented-out code in the example below, you will get back […]

Base64 Encode/Decode Functions for Powershell

I found the base code for this here: http://vstepic.blogspot.com/2013/02/how-to-convert-string-to-base64-and.html. If you want to know more about Base64, check out this Wikipedia Entry But I’m not a command-line guy, I’m a developer, and I like to have my code in a file where I can edit it, modify it, re-use it, and run it. Function Base64Encode($textIn) […]

Recent Posts

Archives

Categories

Meta

All Rights Reserved Theme by 404 THEME.