New to powershell, I have spent well over an hour trying to set an alias for my new module… Really not impressed with the lack of instructions on this.
When storing a module.psm1 file in the correct My Documents folder, the function automatically loads and is callable with Get-QuestionAnswer when we start a new powershell session, However my Alias isnt callable and doesnt show in the list of aliases
I have tried setting alias using parameter [Alias('gqa')]
This should work … But make sure that after each change you import your module using -force. Without this switch, your module will not get updated with the latest code, it will just use the one already in memory.
The above would make an Alias for each function\cmdlet Get-RiddlerQuestionAnswer would have an Alias of Get-RdlQuestionAnswer. When the module is exported, you also need to export the Aliases with -Alias *.
Yes, spaces…ignored, used greater than (>) and that rendered funky too, periods it considers ellipsis and more than 3 is truncated to 3. Guess I need @Olaf 's guide to forum formatting and etiquette, volume 1?