July 2nd, 2013

PowerTip: Customize PowerShell Cmdlet Names to Avoid Conflict

Doctor Scripto
Scripter

Summary: Customize Windows PowerShell cmdlet names that you import from a module to avoid naming conflicts.

Hey, Scripting Guy! Question How can I easily distinguish a cmdlet that has the same name as cmdlets in other modules?

Hey, Scripting Guy! Answer When you import the module, use the –Prefix parameter, and supply custom prefix (ipmo is an alias for ImportModule):

ipmo -Prefix mred -Name pscx

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback