Powershell Tip #51: Avoid command name conflicts in a session

By | October 6, 2015

Tip: You can use -Prefix or -NoClobber parameters to avoid command name conflicts in a session (ex: when importing functions from a module).

NoClobber: does not overwrite an existing command. If the command (Get-Something) has the same name than an existing one in the session, the command is not imported.

Prefix: adds a prefix (DEMO) to the noun (-Something) in the names of the imported module members.


Note: The –NoClobber parameter shows conflicts only when the switch parameter -Verbose is used.


Leave a Reply

Your email address will not be published.