I’m often training administrators to use Windows PowerShell or offering guidance in a number of forums. As you might imagine I see a lot of code samples. Of course I help with the immediate challenge, but often I see opportunities where a few slight tweaks to the code layout can make a difference in readability and troubleshooting. Here’s what I’m talking about.
Tag: Alias
Sneaky Aliases
love aliases in PowerShell because they make working in the interactive shell so much easier and faster. I’ve even created aliases for common apps I use like PrimalScript and PrimalForms so I can launch them from PowerShell with a few keystrokes. One drawback to aliases is that you can use them to reference any command that takes parameters. The alias can only substitute for the command. But there is a sneaky work around.