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.
Maybe it’s my liberal arts background but I love words and word games. I have a constant pile of crosswords and enjoy tormenting my kids (and wife) with puns. I am also fascinated with word hacks like palindromes and anagrams. An anagram is where you take a word like ‘pot’ and rearrange the letters to spell another word like ‘opt’ or ‘top’. Short words are easy to do in your head. So I thought why not get PowerShell to do some of the letter crunching for me.
I wanted to be there as it were as you started your very first day learning and using PowerShell. My goal was to be with you virtually, and guide you through how you should spend your first hours with PowerShell. If you’ve decided to set out on the journey, I wanted to make sure you head off in the right direction and not on your own. You can check out a short overview clip here.
Clearly, you aren’t going to learn PowerShell in 90 minutes and you should watch this course in conjunction with some of the other PowerShell fundamentals courses. For those of you who have already watched the course, thank you. I’ve received plenty of nice comments.
Now I’d better get back to work on the next one!