PowerTip: Provide Alternate Name to Nouns in Module

Doctor Scripto

Summary: Use Windows PowerShell to provide alternate names to nouns in modules to avoid conflicts.

Hey, Scripting Guy! Question How can I use Windows PowerShell to avoid the problem of having conflicting cmdlet names in different modules?

Hey, Scripting Guy! Answer Use the Prefix parameter with Import-ModulePrefix will take whatever letter segment you provide and
           add that before the noun in all the cmdlets for a module you load. For example, if I want to make sure all the
           cmdlets in the UEV module have HSG before the noun, I would type:

Import-Module UEV –prefix HSG

0 comments

Discussion is closed.

Feedback usabilla icon