Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerShell PowerTip: searching and installing modules on the command line

PowerShell 5+ ships with the module PowerShellGet, which lets us search and install modules from cmdlets. The default nuget repository is the PowerShell Gallery, but you could add others yourself (including custom ones for internal modules). There are a lot of reasons this could help you: There are a lot of cmdlets in the module, ...

Regular Expressions (REGEX): Grouping & [RegEx]

Welcome back to the RegEx crash course. Last time we talked about the basic symbols we plan to use as our foundation. This week, we will be learning a new way to leverage our patterns for data extraction and how to rip our extracted data into pieces we care about. [RegEx] The  data type has some cool static members,  but we're mostly going...

PowerShell PowerTip: History of commands with PSReadline

One of the really cool things PSReadline provides (module shipping on v5+) isn't as immediately obvious as the syntax highlighting. It offers a persistent history that is stored from session to session. This means if you run commands in a window, close it, and open a new one later you can still hit the up arrow and scroll through them. I ...