Posts

Showing posts from February, 2017

Powershell: Getting familiar with SQL Querying (Take Two)

Image
Edit: I was lucky enough to have a fellow redditor point out that I had made a mistake after my initial post. (Thanks /u/Lee_Dailey!). There were two primary mistakes I made with the first version of this script. 1. Can't query a database without first building a connection object. (Yeah that might be helpful!) 2. My syntax used for building my query string was incorrect. That said, here's an updated post :). Before I begin, I recently realized that I need to start being more organized at work and with my posts. The reason is because I'm finding that it is becoming increasingly difficult to choose a topic for a post and that I am very  disorganized. To address this, I've created an "itinerary" for my next three posts. Once I've made it through these three posts, I'm going to re-evaluate and see if any tweaks are needed. Additionally, I'm going to be categorizing my posts so any potential readers can tell whether or not it's relevant be...

It's nothing special..... but it will do.

Image
Hello Again folks! I'm really excited for this post as it is my first time sharing a script via a blog. To preface, I'm clueless about the preferred method of sharing a script via a blog post nor do I really even how to format it for that matter. Additionally, being that this wonderful blog host doesn't allow much with formatting, I decided to use screenshots of the actual code and included a link for the script on pastebin at the bottom. I know, that's what I get for being cheap and choosing the free version. As always, I'm open to any suggestions or feedback. That in mind, lets get into this! As I prefaced in my last post, this is the first script that I published to our module (Yes, the one that I broke). Actually, funny story, I've broke it close to half of a dozen times now doing the same type of thing but I'm happy to say that I've finally committed the process to memory. Anyways, I've named this beast Invoke-MachineDump.ps1 because I co...