So after a little bit of searching a came across the PowerShell ISE.
Now thats nothing new, but what i didn't know is that you can add "add ons" to the ISE and with that it becomes even more fun.
To be able to add color coded PowerShell code to your blog install the module "IsePackV2"
If you haven't set Chocolatey and PSGallery as Packagesource and trusted them then run:
Get-PackageProvider -Name PSGallery -Force
Set-PackageSource -Name PSGallery -Trusted Get-PackageProvider -Name Chocolatey -Force Set-PackageSource -Name Chocolatey -Trusted
This Add on needs some additional modules so we'll install all in one go.
You can run this in PowerShell Ise or regular PowerShell but both must be run with elevated permissions:
Install-Module IsePackV2 -AllowClobber Install-Module ShowUI -AllowClobber Install-Module RoughDraft -AllowClobber Install-Module Pipeworks -AllowClobber Install-Module EZOut -AllowClobber Install-Module ScriptCop -AllowClobber Import-Module IsePackV2
When running the PowerShell ISE as Administrator and running Import-Module IsePackV2 there will be some error. I don't know where it comes from, i'll have to look in to that later.
But for now the thing your looking for is the add on we just added.
The way this is as follows.
Your type some stuff in the script pane in the ISE.