Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias for Get-CertificationAuthority #15

Closed
fullenw1 opened this issue Sep 25, 2017 · 4 comments
Closed

Alias for Get-CertificationAuthority #15

fullenw1 opened this issue Sep 25, 2017 · 4 comments

Comments

@fullenw1
Copy link

Hi,

To use the cmdlet Get-CertificationAuthority we have to type Get-Certificati + Tab or Get-Cer + Tab 13 times.
Given that we have to pipe this cmdlet to many other cmdlets from the PSPKI module, could you please implement an alias for the Get-CertificationAuthority cmdlet (for example gca)?

Thanks in advance and thanks again for you great work!

@Crypt32
Copy link
Collaborator

Crypt32 commented Sep 26, 2017

My module provides several built-in aliases for commands. Especially, Get-CertificationAuthority command has Get-CA alias and you can use it. On main project page you can find the list of commands and aliases where available.

In addition, there is no need to call Get-CertificationAuthority command each time during a single session. You can easily save CA object in a variable and then pipe it to other commands.

@fullenw1
Copy link
Author

Good news!
In fact, I typed Get-Alias Get-CertificationAuthority and it returned that there is no alias for this cmdlet.
I guess the Get-Alias cmdlet only returns aliases declared inside functions...

You are right for the variable. It's even faster because you search for available CAs only once.
Thanks you!

@Crypt32
Copy link
Collaborator

Crypt32 commented Sep 28, 2017

I guess the Get-Alias cmdlet only returns aliases declared inside functions...

Get-Alias works in opposite direction: it resolves known alias to unknown fully-qualified command name. That is, if you type Get-Alias Get-CA it will return the fully-qualified command name Get-CertificationAuthority. It doesn't show possible aliases for known command.

@fullenw1
Copy link
Author

Damn! You are right! A real newbie error: I forgot the -Definition parameter... :-/
Get-Alias -Definition Get-CertificationAuthority works fine :-)
Mea Culpa!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants