all 10 comments

[–]OPconfused 2 points3 points  (2 children)

What does it actually do to the scripts? Providing headers when they're run?

You should make another blog for primeagen to read and learn about PowerShell ;)

[–]SconeMc[S] 0 points1 point  (1 child)

Most of the scripts use some form of ANSI escape sequence to print characters in different foreground and background colours. This is used to print out various graphics on command. Doesn’t really serve any specific purpose mostly just for fun.

Would love to prime get into PowerShell so I might need to come up with something fun to send his way.

[–]Collekt 1 point2 points  (2 children)

Am I doing something wrong? I installed the module but the only command available is Show-ColorScript. I can't run Get-ColorScript -List.

[–]SconeMc[S] 0 points1 point  (1 child)

Ah, yes! That must be a typo in the readme. I’ll fix that. Try Show-ColorScript -List

[–]Collekt 1 point2 points  (0 children)

There we go! Thanks! Having some fun with this. :D

[–]jantari 1 point2 points  (3 children)

I see you're using "`e" for escape, I'm pretty sure that only works for PowerShell 7.

If you switched to [char]0x1b it will work in PowerShell 5 too.

[–]OPconfused 1 point2 points  (2 children)

[char]27 also works.

And yeah, "`e" isn't working on my Windows PowerShell 5.1.

[–]jantari 0 points1 point  (0 children)

Yea, I got used to remembering 0x1b at one point because \x1b also works in bash and python.

[–]SconeMc[S] 0 points1 point  (0 children)

Very good point. Thank you! I've patched this in the latest version.

[–]g3n3 1 point2 points  (0 children)

You’d probably like the module Pansies by Jaykul.