Skip to content

Script name creates a naming conflict with the function #2

@BristleBeard

Description

@BristleBeard

I'm not really sure if this qualifies as an actual issue. A naming conflict is being created because the script name and function within it are both called Get-vmotion.

If I use Install-Script the script name itself registers as a command. When I try Get-vMotion it executes the script itself and registers the function, but I can not get it to run the function.

I've hit this before where two modules (Hyper-V & PowerCLI) had the same command name, and I got around it by prefixing the module when I import it, or directly referencing the one I want- (vmware.powercli/Get-VM instead of Get-VM). I have not been able to use that method in this case because the script isn't a module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions