Change CimCmdlets to use AliasAttribute#12617
Change CimCmdlets to use AliasAttribute#12617anmenaga merged 2 commits intoPowerShell:masterfrom thlac:master
Conversation
iSazonov
left a comment
There was a problem hiding this comment.
Please test in DefaultCommands.Tests.ps1
|
I saw that and thought that test was only for aliases defined in InitialSessionState.cs, but looking at it again it also says it only checks default loaded modules, the CimCmdlets module is not automatically loaded by default. Not sure if I am misunderstanding anything, but the aliases looked to be default, because it was set during the module load, so it's technically the equivalent of the user doing |
|
We have a list of modules in the test and explicitly load the modules. |
|
Okay, thanks, just wanted to make sure. I've added tests for them now :) |
|
That test doesn't fail locally here |
|
@daxian-dbw @SteveL-MSFT Please check this PR. Do you have any theories why alias initialization for |
So in PSv2, the |
|
@thlac Thanks for your contribution! |
|
🎉 Handy links: |
PR Summary
Changes CimCmdlets-modude to use AliasAttribute and removed CimCmdletModuleInitialize.cs as its only function was to set the aliases
PR Context
Should fix #11988
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header