I’m always looking for ways to help teach PowerShell and the other day I thought why not have PowerShell teach you itself? I have created a PowerShell script that dynamically generates a quiz on cmdlets and functions installed on your computer. In short the quiz question shows you a command synopsis and then presents a menu of possible answers. You select the answer. Given the verb-noun pattern of command names this *should* be easy, but you might be surprised.
If you are creating PowerShell scripts, tools or modules today, you are most likely using Git. What? You’re not? Is it because you haven’t gotten around to installing it? I have some “quick and dirty” PowerShell hacks to help you out on Windows systems. Linux boys and girls already know what to do.
Not too long ago I posted a PowerShell function that could provide detail abut the PowerShell engine driving your current PowerShell session. I like having a function that writes an object to the pipeline, can take parameters and offer help documentation. But there’s an alternative approach you could also take.
The other day I was watching a good intro video from Shane Young on getting started with PowerShell profiles. I use profile scripts extensively, and they can be extremely useful in configuring your PowerShell experience. One element you could add to your profile is a customized PowerShell prompt. Microsoft provides one by default. It creates a simple function called prompt. The best part is that you can define your own function called prompt, and PowerShell will run it every time you hit enter.
Microsoft has been busy with the next iteration of PowerShell. As you should already know, this version will run cross-platform. The executable, or engine, is naturally different than what you are used to with Windows PowerShell. As I was trying out the latest PowerShell beta, I needed to identify the path to the current PowerShell engine. I then thought it might be helpful to get even more details so I put together a quick PowerShell function called Get-PowerShellEngine.