Just because I always forget.. All of my workstations are Macs, which I then use to connect to my vSphere and Hyper-V labs. This can make it a challenge to create bootable Windows-based USB sticks for my servers. I used to use unetbootin for Mac, but I found it worked well for my ESX servers (sometimes), but not …
Read MoreI just released a new PowerShell script, Get-SQLServerKeys.ps1. The script works works with several versions of SQL Server (2005-2014), and can use Central Management Server, a text file, or just a string of servers as input. Like many of the Windows Key scripts available, this one relies on Remote Registry being …
Read MoreI'm currently attending Regis University for my grad degree, and just finished up a networking class. For my final, I chose to explore the Windows Net.TCP Port Sharing Service. I had this glorious vision of translating some C# code to 100% PowerShell code, but eventually gave into the fact that PowerShell doesn't …
Read MoreBack in 2013, I wrote a blog post about setting up RD Gateway in Windows 2012 using an AD domain certificate. This post is directed to Windows 2012 R2. There isn't much difference, but in this tutorial, I'll demonstrate how to setup RD Gateway with a globally recognized SSL certificate. Like my previous post about …
Read MoreSo here's what's awesome about Secure Socket Tunneling Protocol SSL VPNs: they give your connecting client an IP and make it a full-on part of the network. And this is all done over port 443, a commonly used port which is often enabled on firewalls. SSTP SSL VPNs are not like some fake "SSL VPNs" that just …
Read MoreI <3 cheapsslsecurity.com. They (and probably others) sell globally recognized $5.99 annual certs. Now, all of my lab stuff (Lync/RD Gateway/NetScaler/SSL VPN) is encrypted, and I no longer have to manually install my Domain CA's root cert on my phones/other devices. They don't have an affiliate program, so I'm not …
Read MoreAs a SQL Server DBA, I'm used to SQL being able to perform aliasing, super fast subselects, and easy aggregation. My most recent project, Invoke-Locate.ps1, however, uses SQLite because of its portability and speed when performing simple selects and inserts. The downside is that SQLite doesn't handle some subselects …
Read MoreThis is mostly for my reference, but you can use it, too :) Create Basic Datatable 1$dt = New-Object System.Data.Datatable 2[void]$dt.Columns.Add("First") 3[void]$dt.Columns.Add("Second") 4[void]$dt.Columns.Add("Third") 5 6# Add a row manually …
Read MoreUpdate 1/4: Removed conversion of datatable to list. That just wasted memory, as this works on all enumerables. I don't have a practical application for this method, but I wanted to figure out how to do it anyway. Doing so was frustrating but kinda fun. It forced me to learn about lamdas in PowerShell which I'll …
Read MoreIf you've ever tried to use PowerShell's Import-CSV with large files, you know that it can exhaust all of your RAM. Previously, I created a script on ScriptCenter that used an alternative technique to import large CSV files, and even imported them into SQL Server at a rate of 1.7 million rows a minute. I've now gotten …
Read More