I have a module PhriInfrastructure
which codifies our DevOps procedures at my organization. It has a function Test-IsLocalhost
that I've aliased to Get-IsLocalhost
for backwards-compatibility reasons.
I've tried to apply a description
to the alias, like so:
New-Alias -Name Get-IsLocalhost -Value Test-IsLocalhost -Description "Get-IsLocalhost was renamed Test-IsLocalhost to better-match Powershell verb standards"
however, when I try to pull metadata about the alias in the command-line
Import-Module .\PowerShellModules\src\PhriInfrastructure -Force
(Get-Alias Get-IsLocalhost) | Format-List -Property *
Get-Help Get-IsLocalhost
the Description
field is empty in both the Get-Help
and the Get-Alias
(the underlying Test-IsLocalhost
command only has a #.Synopsis
.
Meanwhile, if I attempt to create the alias direct from command-line, it appears in the alias members (but still not in the get-help).
Is there a way to expose the alias description properly? Or some better way to say "don't use this alias, use the primary one?" Is this just a bug in how Powershell 5.1 exports aliases in modules?