My First Twitch Livestream Setup

Back in December, I found Twitch and fell in love with livestreaming. It was amazing watching people code in PowerShell with blinged out profiles and cool cut screens. Whaaat, this is a thing? I love it!

Getting started

I jumped into streaming (I’m potatoqualitee on Twitch) as soon as I found the PowerShell Live Twitch group on Twitter, and discovered the learning curve was a bit steep.

This post is aims to address the things that were confusing for me when I was starting out as well as my current setup.

  • Quick intro
  • Streaming Hardware
  • Streaming Software
  • Stream Settings
  • Twitch Settings

So first, a bit of the human side: I tested in a non-live stream to see what it’d be like to code in front of an audience. Would I make weird faces and say dumb stuff? Turns out, yes, but my friends enjoyed it so I put it on YouTube for the public and got a warm reception πŸ€—

Next up, it was time to stream for real! I had a blast. A whole bunch of PowerShell friends from Twitter joined and this is what it looked like.

Next video will have the chat box on that right side. Sorry, lesson learned πŸ˜–

So now onto the guide for you based on my past month of learning.

Overall idea

The overall idea of streaming is this: you create an account with Twitch, get your streaming key, plug it into your streaming software, do some additional configurations, then hit Start Streaming. From there, you’ll be streaming, and whoever wants to join your channel can see you stream, albeit after a slight delay (which you can control with latency settings).

Streaming platform

The two most common streaming platforms appear to be Amazon’s Twitch and Google’s YouTube. Most of the PowerShellers I know are streaming on Twitch, though PowerShell Security expert Carlos Perez just started on YouTube. This guide will only address Twitch because that’s what I use.

Streaming software

In order to livestream, you’ll need some streaming software. OBS is free and the most popular, and even advanced streamers who can afford paid software use it. Twitch and YouTube have minimal guides, but my favorite guide is Top 10 Best Twitch Streaming Software Options written by Bill R in October 2018.

A nice lil profile

You can also bling your channel, and a lot of people do. This is what my channel looks like today.



I am so relieved I just upgraded my desktop because it seems streaming requires decently hefty hardware. This section won’t be super interesting, admittedly. I love software development and like my hardware simplified.

My headset is worth a separate mention. The mic is exceptional for a headset; I was recently told during a meeting that it sounded as though I was sitting next to the person. I’ve had this pair for years, the bass is great and love it.

Even better, the Sades SA903 7.1 Surround Sound USB PC Stereo Gaming Headset is only $29.99 on Amazon.

I tried a cheaper $20 version for a backup, but I much preferred the SA903. So now I have this leet black and red set on the way 🎧 For Windows users, the driver issue is weird. Sander Stad got a pair and said the drivers aren’t on the vendor website. You can download them here.

If you find that you are streaming regularly and want to invest in a higher-end setup, check out Jeff Fritz’s post Live Streaming Setup – 2019 Edition.

Also if you get super into streaming, you can get a Stream Deck which is a physical controller with a bunch of macros on it. People even do green screens too, which is covered in Jeff’s post. Maybe I’ll get that for my birthday, but no need for it just yet.

Streaming Software

I chose the Open Broadcast Software, otherwise known as OBS, to broadcast my streams. At first, I was so frustrated with it, I decided I’d pay for one that was easier to use, but then it turns out none of them supported mac OS πŸ‘Ž. So back to OBS.

Happy that it turned out that way, tho! Now that I know how to use it, it’s perfectly suitable.

I won’t go over OBS in-depth, I’ll just cover the things I found challenging, mostly because it’s a whole new world and I didn’t know where to find things or what words to use when searching.

Update: I recently received a message from fellow streamer Shawn Melton who said

OH MY GOODNESS….streamlabs is so flippy easy to setup compared to OBS. It even prompts you on some starting widgets to add to your stream and walks you through each section

I heard great things about StreamLabs but could not try it out because it’s not Mac compatible. If you’re interested, give it a go. It’s based off of OBS so the rest of the guide will likely apply a lot.

Pause screen

First, you’ll notice that a lot of people are like “k, gotta cover my screen while i log into my vpn, be back in 5”, then a cool lil cut screen comes up. That’s a Scene. Here’s mine.


Switching back and forth between showing your screen with some sound and showing a silent photo, is as easy as clicking between “Scenes”


Note that this is a pretty straightforward scene. It’s named pause and just has two Sources or elements. The Creative Commons image and then the simple text that says be right back.

And another update: turns out that you may need to add an extra Source to ensure your mic is muted while you are away. Most people recommend muting your mic physically. I suggest a backup software mute as well. Add an audio source then turn it off.


As someone pointed out to me on Twitch during a livestream, make sure that you have no hidden audio sources! This bit me, too.


Working screen(s)

window stream

My scene, which shows things like my video, chat and so on, is setup like this in OBS.


Here are the Sources for this Scene.

  1. KapChat – if you see chats in other people’s streams and would like a chat stream in your videos, try KapChat. The sample video above does not have the chat yet :( I realized after publishing that other people couldn’t see what we were all were saying so now it’ll be there for future streams.
  2. PubNub Closed Captioning uses AI to automatically subtitle as you speak.. Cool as hell! Closed captioning enables the deaf and hard of hearing community to enjoy your stream. It also helps with people who’d prefer to watch the code on mute.
  3. Audio input capture – in this case, I set mine to “USB Audio Device” or “Default” which is how my Sades headset shows up.
  4. Video capture device – it automatically detected my built-in webcam and boom, that adds a video of me to the stream.
  5. Specific window – so I’m actually RDPing from a Mac to my Windows lab. This Source is that RDP window, the star of the show.
  6. Background – is the hammer photo in the background, which I got from Jason Helmick’s blog post

core dev – entire display

When I am developing for PowerShell Core, it’s easiest and best to develop on the Mac itself. Because of this, I share my entire primary display, as I need to show VS Code, GitHub Desktop, PowerShell itself and more.


You can see in the above screen, the only thing that changes is that the relevant Source changes from Specific window to Display Capture

Stream settings

I mostly use the settings that are from Best OBS Settings for Twitch. I had an issue with choppy video tho, and found these settings worked best.



I don’t understand the mechanics, but here’s what works for me, based off of a 2560×1440 native resolution:

  • Native Resolution: 2560 x 1440
  • Base Canvas Resolution: 1920 x 1080
  • Output (Scaled) Resolution: 1280 x 720

This is important: even though I have 7MB up and a decent setup, my stream started clipping any time my output resolution went above 1280 x 720. So if you think your internet is just weak, try lowering your output resolution.

But really, dig into Best OBS Settings for Twitch and personal testing for fine tuning. Be sure to give your stream at least 10 minutes to crap out.

Recording locally with OBS is a great way to test how your local configs sounds and see how will look when you’re streaming. Just hit Record instead of Stream. I also saw that you can test your stream with Twitch’s inspector but I haven’t played with that yet.

Twitch settings

So now that you’ve got your streaming software ready, let’s spruce up your Twitch channel.


First, to setup your avatar and banner, go to your profile. The banner is what appears at the top when you click someone’s avatar/screenname when visiting their channel. In my profile, it’s a picture of my office.

Note that the banner isn’t immediately visible when you visit a profile. It appears only after you click the user’s avatar.


Next to name your stream (some people update this each time, some leave it for good. The name of mine right now is powershell and chill), hit up your Dashboard Live settings

To add a Video Player Banner, go to your Dashboard Settings. On my channel, the Video Player Banner is the PowerShell Hammer.


The lil sections at the bottom of people’s channels are called Panels. You can add your own informational panels by clicking the Edit Panels button.


I found someone’s channel and liked their panels so I saved them and used them on my own channel because I figure panels are reused on twitch. Still not sure if that’s accurate or not but I’m thinking yes πŸ€”

Edit: Since this screenshot was taken, I’ve added three extensions. So this section can do text or image panels or extensions. Both are easy to config.

Panels are a popular thing to customize and you can even download packs of them. has a Panel generator. OMG, and they even have a Retro Wave Panel Package!


Chat Rules and Moderation

You may notice when you go to most channels, they have Chat Rules. The Chat Rules can currently be found on the Moderation Settings page under Channel Privileges. My chat rules are don’t be a d:\


From the Moderation Settings, you can also block specific terms and phrases. If you’d like a friend to be a moderator, you can add them as one to the Roles page.

I ban a whole lot of stuff, including non-friend raids because I just wanna PowerShell and chill, yenno?


Twitch will automatically record and archive your streams for you if you go to your Dashboard settings and Store past broadcasts.

Archiving to YouTube

Twitch archives your videos for a limited period of time, however. For extended viewing, most of us export our videos to YouTube. Twitch makes this easy.

  1. Navigate to Video Manager from the menu to access the list of videos you have created.
  2. Select Past Broadcasts and More.
  3. Select Export. Select a title and any settings you want to add.
  4. Set the privacy options, Public or Private.
  5. Select the Export button.

Sound sharing

Due to copyright issues, you can’t just stream any music. Twitch will literally silence portions of your video and YouTube also barks if you play copyrighted stuff or if their algorithm messes up.

To combat this, you can use a number of streamer-friendly music services, but most people I’ve seen use is Pretzel.

I’m not a huge fan of sharing music within my stream; it subjects portions of your video to be potentially muted and, even if you’re saying great stuff, people may still leave the stream because the music drives them crazy.


OBS blank/black screen

Using an laptop with Nvidia GPU to livestream and get an OBS black screen? This solution totally worked for Sander Stad who ran into the same issue.


Here are some handy links.

I plan to write a follow up post once I learn more about things like the benefits of subscriptions, affiliations and cool features like streaming to both Twitch and YouTube. Hope to see you soon on Twitch! πŸ‘©β€πŸ’»

Posted in Livestreaming, PowerShell

Weird Publish-Module errors

Recently, I was trying to publish a module and ran into an error:

Failed to generate the compressed file for module ‘Attempting to build package …’

After searching for a bit, I found someone who fixed a similar issue with a nuget reisntall. That got me thinking that my psd1 was not problematic, but rather my PowerShellGet was problematic.

So I Save-Module PowerShellGet -Path C:\temp then deleted the current PowerShellGet (manually using Explorer), reinstalled and voila. I was able to publish my module.

Posted in Uncategorized

Even faster PowerShell module loading

Update: This method is faster but some anti-virus software hate it. I’ve since reverted our method of import to an all-in-one ps1 πŸ‘Ž

Considering dbatools now has over 500 commands, we are always eager to keep an eye on the speed of our import process.

As outlined in the blog post decreasing module import times, we’ve taken multiple approaches to reduce the import times, including combining all commands into one large allcommands.ps1 file.

Last week, I took it a step further.


I don’t know the in-depth internals of Import-Module, but I know that importing a DLL filled with C# cmdlets is extremely fast. For instance, Microsoft’s SqlServer module imports 100 commands in less than a second. Sometimes it’s closer to half a second!

I wondered if we could somehow compile our commands into a C# binary but that seemed far-fetched. One thing we could do, though, is use compression! It works for SQL Server backups, could it work for PowerShell?

Yes 😁

Turns out that the approach worked! I believe this is due to the performance benefits of streaming and reduced I/O. Note this technique is part of a multi-pronged approach which includes runspace and not using Get-ChildItem.

Here’s how I did it. First, each time I publish the module, I rebuild allcommands.ps1 then zip it. This reduces the size of our module on disk a bit as well, too, since the uncompressed ps1 is over 5MB and the zip is less than 1MB πŸ‘

Set-Content -Encoding UTF8 -Path C:\github\dbatools\allcommands.ps1 -Value "### DO NOT EDIT THIS FILE DIRECTLY ###"
Get-ChildItem -Path "C:\github\dbatools\functions\*.ps1" -Recurse | Get-Content | Add-Content C:\github\dbatools\allcommands.ps1
Get-ChildItem -Path "C:\github\dbatools\internal\functions\*.ps1" -Recurse | Get-Content | Add-Content C:\github\dbatools\allcommands.ps1

Remove-Item -Path C:\github\dbatools\ -ErrorAction Ignore
Compress-Archive -Path C:\github\dbatools\allcommands.ps1 -DestinationPath C:\github\dbatools\
Remove-Item -Recurse C:\github\dbatools\allcommands.ps1 -ErrorAction Ignore

Next, I added the following to our module file. This code is run each time the module imports. You’ll notice that it opens the zip and streams it right in as a script block.

Add-Type -Assembly System.IO.Compression.FileSystem
$zip = [System.IO.Compression.ZipFile]::OpenRead((Resolve-Path -Path "$script:PSModuleRoot\"))
$stream = $zip.Entries.Open()
$reader = New-Object IO.StreamReader($stream)
$ExecutionContext.InvokeCommand.InvokeScript($false, ([scriptblock]::Create(($reader.ReadToEnd()))), $null, $null)



Trade off

What’s the trade off? More CPU usage on your part for the moment it takes to stream the file (though you’ll save on I/O) and for me, it’s an extra (automated) step.

Ultimately, this approach shaved off about a third of our import time. If you’re looking to squeeze as much speed out of your import as possible, compression can help. And don’t forget, if you have super slow imports, it may be your Execution Policy.

Posted in PowerShell

your code doesn’t suck

Recently, I had a couple colleagues tell me that their PowerShell code sucks.

One of them is a beginner who manages a large SharePoint farm and the other is more advanced and wrote a few commands that saves me hours of work each week.

See the disconnect there? Their PowerShell code, which helps manage Enterprise platforms and saves hours of work a week, not only doesn’t suck, it’s actually awesome.


your ps is actually awesome

Their PowerShell is awesome because it works. Their PowerShell code is awesome because they’re using it. It’s also awesome because the time they invested in creating code that:

  • Will save people time in the future
  • Helped them practice a valuable skill set
  • Keeps them relevant
  • Will look fabulous on their resume

Nobody goes from being a beginner to an expert overnight, and it’s important to allow ourselves the time to learn.

my own story

I feel like I’ve got code that sucks, too. In particular, I’m tortured by one of the commands I used to be super proud of, Import-DbaCsvToSql. I die inside when people talk to me about it, but I leave it in dbatools because people love it. It’s useful and, enough of the time, it works πŸ˜‰

I learned a ton when I was creating that command, and even did a presentation about it.

The adventure of creating that command (and Bruce Payette attending my session!) was so exciting, it prompted me to dive even deeper into PowerShell.

Yet I fight back against my impulse to remove Import-DbaCsvToSql from dbatools. I literally have to resist the urge, but I do it by reassuring myself that:

  • One day I’ll rewrite it
  • Until then, some people really find it useful

Import-DbaCsvToSql is embraced because it’s fast. But it’s fast because it has no error handling. No error handling can be okay if you’ve got some perfect input, but input is rarely perfect.

The command simply doesn’t work enough for me, yet at the same time it tries to do too much. It totally stresses me out.

And, y’all, I showed this code, along with Start-SqlMigration.ps1 to Lee Holmes of the PowerShell team, all proud. He was so kind in response. I didn’t follow best practices, but he didn’t chide me. He said I was doing great things, and should keep on writing code and continue to improve along the way.

it’s all about adoption

Ultimately, I believe that Lee cared most that PowerShell had an enthusiastic adopter, even if I still had a lot to learn.

And I now realize that adoption is what’s actually important. Adoption will lead to that extreme excitement that I feel when I execute something and announce to my coworkers that I’m chillin because PowerShell is doing all my heavy lifting. From there, I’ll use that momentum to make my code even better.

Then I’ll invite my coworkers over to see my improved code, and we’ll celebrate. Then they’ll invite me over to see their improved code, and we’ll celebrate.

And then we’ll all live happily ever after, with our awesome code.

Posted in PowerShell

a huge thanks

Yesterday, I presented at PSPowerHour and during my intro, my iPad’s volume turned up so I got distracted when talking about something that really meant a lot to me.

And I’m a bit bummed that I wasn’t able to properly convey how much it meant that I was awarded as a PowerShell Community Hero earlier this year. I was looking forward to the opportunity!

From the moment I first heard about PowerShell, I knew that it would be a game changer. It’s probably the coolest and most fun technology I’ve ever worked with.

So when I saw Joshua Corrick’s tweet that I was awarded, I literally started yelling.

I am beyond honored that the community and the PowerShell team felt my work deserved to be acknowledged among the other highly decorated community contributors. And there’s something extra magical about being acknowledged not just by the PowerShell Team, but also by my peers. It ranks in the top achievements of my life.

I keep my PowerShell Community award right next to my MVP award, and I smile every time I hold it. Thanks to all involved for the huge honor πŸ’ž.

Posted in PowerShell

T-SQL Tuesday #104: Code I Would Hate To Live Without


Today’s blog post is part of T-SQL Tuesday. T-SQL Tuesday is the brainchild of Adam Machanic. It is a monthly blog party on the second Tuesday of each month. Everyone is welcome to participate.

This month’s T-SQL Tuesday, hosted by my buddy and YouTube star Bert Wagner (blog | twitter), is all about the SQL Server tools I use and love. This post is about PowerShell, of course.


dbatools is such a fun toolset to work on, but specifically, I can no longer live without Start-DbaMigration. Even in smaller shops, migrations are often required and they are always a lot of work.

At least they used to be, before I built the command that started it all: Start-DbaMigration. Start-DbaMigration is an instance to instance migration command that migrates just about everything. It’s really a wrapper that simplifies nearly 30 other copy commands, including Copy-DbaDatabase, Copy-DbaLogin, and Copy-DbaSqlServerAgent.

Here is what it looks like in action:

So simple. To migrate an entire instance, all I had to do was execute the following:

Start-DbaMigration -Source sql2016 -Destination sql2017 -BackupRestore -NetworkShare \\nas\sql

How cool is that?! It is such a relief that I no longer have to dread migrations. I don’t have to go find sp_help_revlogin and execute it then copy the stuff over. I don’t have to figure out the default paths of whatever. I don’t have to worry that I’ll copy over a job but not its associated schedule.

Everything is just done for me, and I can sleep better at night 😴

Bonus: dbachecks

Ever since I was a baby DBA working for a company with a small budget, I’ve always wanted something like dbachecks. dbatchecks helps automate the checklists that we gotta go through every day, week, month, quarter, year and so on.

This used to be a manual pain, but now it’s automated, open-source, free and gorgeous πŸ’….

That whole module is some awesome code. And you can read about it here.

Thanks for joining me for this month’s T-SQL Tuesday. Sorry I never write about things in-depth.

Posted in PowerShell, SQL Server

my first open source project

I was first introduced to open-source on IRC back in 1996. I joined the #toriamos channel on undernet, which was managed by an eggdrop bot named [iCKy].

[iCKy] was an open-source TCL and C-based program that did cool stuff for us, like auto-ban users if they were flooding the channel. There was even a party line that sort of worked like a Linux shell.

This all looked like hacker stuff to me, so I wanted to know how it worked. This meant I had to learn Linux, which I did. Then I had to learn about eggdrops, which I did. Then I setup a few bots on an always-online Linux server. All for $0, too awesome.

By July 1998, I knew TCL well enough to hack an IRC script together and release it. But I gave the project an awful name that would trigger spam filters so I’ll skip it and move on to my second, more mainstream open source project ;)


There used to be this open source directory called, which eventually became freecode. freshmeat was leet as hell and I dreamt of being part of it.

Finally, I had a project I thought was decent enough to add and released 1.0 on September 5, 1999. SPAST, which stood for Simple Procmail Anti-spam Template, was a procmail template that I setup to filter mail being delivered to my postfix email server.

As the name suggests, SPAST was simple, which made it easy to implement and adopt. I laughed recently when I read the archived review at which said

Not the best possible approach, but it makes it easy to get started.

Totally valid πŸ˜‚


I found it pretty cool that a couple other projects were inspired by or forked from SPAST, like SPASTIC. SPASTIC, which still exists at sourceforge, was maintained by a guy named Keith Winston and the project eventually grew to have 11 other developers!

Keith even wrote an article titled SpamAssassin vs. Spastic, which compared the two projects. Ultimately, he stopped developing SPASTIC and adopted SpamAssassin. By that time, I’d since migrated to Exchange in an effort to replicate my work environment.

Fighting spam was always a fun way to pass time, and years later in 2007, I wrote a tutorial on how to use Gmail to filter spam in Exchange instead of Postini (which was eventually purchased by Google anyway).


Considering that I’ve dreamt of having a cool open source project since The Verve’s Bitter Sweet Symphony was a chart topper, you can imagine how rewarding it’s been that dbatools has gotten so popular! And it’s a project that revolves around my two favorite things: SQL Server and PowerShell.

We now have over 110 contributors to our GitHub repository and nearly 1500 people in the Slack channel. The experience as a maintainer for a relatively successful project has been everything I’ve dreamed and more 😊

Posted in Linux

My very first web site, resurrected in all its 90’s glory

Well, if it wasn’t my very first, it is close enough. Back in 1997, I was taking a computer class at a non-progressive college in Northwest Louisiana. Most of the tech classes still teaching Fortran and the faculty pushed back hard when I asked if we could work with more modern technology.

I was disappointed with my experience there overall, but did enjoy this one class by Dr. John Barber called “Computers and Composition”. Dr. Barber was cool and the first person to introduce me to cyberpunk culture. And that’s about all I remember about the class, except for a website that I worked on as part of an assignment.

The site was called “The Q Zone” and it was built with NetObjects Fusion (and optimized for NetScape, y’all). In my mind this site was HUGE, but looking at it now, it’s only five pages. Five awesome pages of sci-fi fun.

Years later, Dr. Barber ended up referencing the site, which I found quite complimentary.

The Q Zone was accompanied by a well-written piece of time travel, co-authored by my classmate and partner at the time.

Word and paper do not suffice anymore as hypertext and electronic writing infuses with the various powerful technologies that heighten the communication process. These technologies include the use of Java, Dynamic Hyper Text Markup Language (DHTML) and all types of animated graphics and embellishments.

So good. So 90’s. So Shoney’s.

This animated embellishment brought to you by giphy.

Posted in General