Sending Messages in OSD to Slack

I originally saw Terence Beggs post about sending messages through Microsoft Teams. Not having Teams, I wanted to send the message through Slack instead. This pretty much operates in the same fashion but had to be tweaked in order to work properly. These script(s) are a very minor part of our SCCM environment, but I really love getting notified when either in-place upgrades are complete, or computers are imaged.